Skip to content
Snippets Groups Projects
Unverified Commit f7d41c50 authored by David Bauer's avatar David Bauer Committed by GitHub
Browse files

Merge pull request #3303 from grische/remove-scripts-wide-shellcheck-excludes

scripts: remove scripts-wide shellcheck excludes
parents e9acd522 b6f7e4bc
No related branches found
No related tags found
No related merge requests found
#!/bin/sh
# list feeds which don't start with # # list feeds which don't start with #
DEFAULT_FEEDS="$(awk '!/^#/ {print $2}' openwrt/feeds.conf.default)" DEFAULT_FEEDS="$(awk '!/^#/ {print $2}' openwrt/feeds.conf.default)"
export DEFAULT_FEEDS
...@@ -24,5 +24,5 @@ find scripts -type f | while read -r file; do ...@@ -24,5 +24,5 @@ find scripts -type f | while read -r file; do
is_scriptfile "$file" || continue is_scriptfile "$file" || continue
echo "Checking $file" echo "Checking $file"
shellcheck -f gcc -x -e SC2154,SC1090,SC2181,SC2155,SC2148,SC2034,SC2148 "$file" shellcheck -f gcc -x "$file"
done done
...@@ -14,8 +14,10 @@ fi ...@@ -14,8 +14,10 @@ fi
need_sync=false need_sync=false
for module in $GLUON_MODULES; do for module in $GLUON_MODULES; do
var=$(echo "$module" | tr '[:lower:]/' '[:upper:]_') echo "Checking module '$module'"
eval 'commit_expected=${'"${var}"'_COMMIT}' var=${module//\//_}
_remote_commit=${var^^}_COMMIT
commit_expected=${!_remote_commit}
prefix=invalid prefix=invalid
cd "$GLUONDIR/$module" 2>/dev/null && prefix="$(git rev-parse --show-prefix 2>/dev/null)" cd "$GLUONDIR/$module" 2>/dev/null && prefix="$(git rev-parse --show-prefix 2>/dev/null)"
......
#!/bin/sh
# shellcheck source=./modules
. ./modules . ./modules
[ ! -f "$GLUON_SITEDIR"/modules ] || . "$GLUON_SITEDIR"/modules [ ! -f "$GLUON_SITEDIR"/modules ] || . "$GLUON_SITEDIR"/modules
# shellcheck disable=SC2086 # shellcheck disable=SC2086
......
...@@ -15,6 +15,7 @@ else ...@@ -15,6 +15,7 @@ else
exit 1 exit 1
fi fi
# shellcheck disable=SC2181
[ "$?" -eq 0 ] || exit 1 [ "$?" -eq 0 ] || exit 1
echo "$ret" | awk '{ print $1 }' echo "$ret" | awk '{ print $1 }'
...@@ -9,10 +9,14 @@ GLUONDIR="$(pwd)" ...@@ -9,10 +9,14 @@ GLUONDIR="$(pwd)"
for module in $GLUON_MODULES; do for module in $GLUON_MODULES; do
echo "--- Updating module '$module' ---" echo "--- Updating module '$module' ---"
var=$(echo "$module" | tr '[:lower:]/' '[:upper:]_') var=${module//\//_}
eval 'repo=${'"${var}"'_REPO}' _remote_url=${var^^}_REPO
eval 'branch=${'"${var}"'_BRANCH}' _remote_branch=${var^^}_BRANCH
eval 'commit=${'"${var}"'_COMMIT}' _remote_commit=${var^^}_COMMIT
repo=${!_remote_url}
branch=${!_remote_branch}
commit=${!_remote_commit}
mkdir -p "$GLUONDIR/$module" mkdir -p "$GLUONDIR/$module"
cd "$GLUONDIR/$module" cd "$GLUONDIR/$module"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment