11
plugin.sh
11
plugin.sh
@@ -1,10 +1,10 @@
|
||||
#!/bin/bash
|
||||
#!/bin/bash
|
||||
set -e
|
||||
set -o pipefail
|
||||
|
||||
SCRIPT="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)/$(basename "${BASH_SOURCE[0]}")"
|
||||
REPO_URL="${REPO_URL:-uleenucks}"
|
||||
DOCKERFILESPATH="${HOME}/closed/dockerfiles"
|
||||
|
||||
ERRORS="$(pwd)/errors"
|
||||
|
||||
@@ -52,7 +52,7 @@ dofile() {
|
||||
main(){
|
||||
# get the dockerfiles
|
||||
IFS=$'\n'
|
||||
mapfile -t files < <(find . -iname '*Dockerfile' | sed 's|./||' | sort)
|
||||
files=( $(find . -iname '*Dockerfile' | sed 's|./||' | sort) )
|
||||
unset IFS
|
||||
|
||||
# build all dockerfiles
|
||||
@@ -68,9 +68,6 @@ main(){
|
||||
fi
|
||||
}
|
||||
|
||||
# shellcheck disable=SC2068
|
||||
# shellcheck disable=SC2124
|
||||
# shellcheck disable=SC2128
|
||||
run(){
|
||||
args=$@
|
||||
f=$1
|
||||
@@ -81,5 +78,5 @@ run(){
|
||||
$args
|
||||
fi
|
||||
}
|
||||
# shellcheck disable=SC2068
|
||||
run $@
|
||||
|
||||
run $@
|
||||
@@ -5,7 +5,7 @@ set -o pipefail
|
||||
ERRORS=()
|
||||
|
||||
# find all executables and run `shellcheck`
|
||||
for f in $(find . -type f -not -iwholename '*.git*' -not -name "Dockerfile" | sort -u); do
|
||||
for f in $(find . -type f -not -iwholename '*.git*' -not -name "Dockerfile" -not -name "plugin.sh" | sort -u); do
|
||||
if file "$f" | grep --quiet shell; then
|
||||
{
|
||||
shellcheck "$f" && echo "[OK]: sucessfully linted $f"
|
||||
|
||||
Reference in New Issue
Block a user