mirror of
https://github.com/sbopkg/sbopkg
synced 2024-11-09 19:50:25 +03:00
Fix parsing errors with shellcheck.
Fixes shellcheck parsing errors by using safer quoting practices with eval. Line 217: for FILE in $SBOPKG_REPOS_D/*.repo; do ^-- SC1009: The mentioned syntax error was in this for loop. Line 219: while read LINE; do ^-- SC1073: Couldn't parse this while loop. Fix to allow more checks. ^-- SC1061: Couldn't find 'done' for this 'do'. Line 221: eval TMPARRAY=( "$LINE" ) ^-- SC1036: '(' is invalid here. Did you forget to escape it? ^-- SC1062: Expected 'done' matching previously mentioned 'do'. ^-- SC1072: Expected 'done'. Fix any mentioned problems and try again. ^-- SC1098: Quote/escape special characters when using eval, e.g. eval "a=(b)". Line 3054: for i in ${!MD5SUM[@]}; do ^-- SC1009: The mentioned syntax error was in this for loop. Line 3056: while :; do ^-- SC1073: Couldn't parse this while loop. Fix to allow more checks. ^-- SC1061: Couldn't find 'done' for this 'do'. Line 3065: eval SRCNAME=( $( ^-- SC1036: '(' is invalid here. Did you forget to escape it? ^-- SC1062: Expected 'done' matching previously mentioned 'do'. ^-- SC1072: Expected 'done'. Fix any mentioned problems and try again. ^-- SC1098: Quote/escape special characters when using eval, e.g. eval "a=(b)". Signed-off-by: Willy Sudiarto Raharjo <willysr@sbopkg.org>
This commit is contained in:
parent
c24c2dd5d6
commit
836c067774
@ -93,3 +93,4 @@ We moved to github, so revision number no longer used
|
||||
Alan
|
||||
Erich Ritz
|
||||
arcctgx
|
||||
orbea
|
||||
|
@ -218,7 +218,7 @@ load_repositories() {
|
||||
# Reading from $FILE...
|
||||
while read LINE; do
|
||||
grep -q '#' <<< "$LINE" && continue
|
||||
eval TMPARRAY=( "$LINE" )
|
||||
eval "TMPARRAY=( $LINE )"
|
||||
[[ ${#TMPARRAY[@]} -eq 0 ]] && continue;
|
||||
# Sanity checks
|
||||
# these two assignments work around a bash3-4 incompatibility
|
||||
@ -3062,11 +3062,11 @@ get_source() {
|
||||
# inside file names.
|
||||
# We know that we could obtain the same result faster by mangling
|
||||
# with IFS, but the resulting code was a bit too hacky.
|
||||
eval SRCNAME=( $(
|
||||
eval "SRCNAME=( $(
|
||||
while read LINE; do
|
||||
printf '%q ' "$LINE"
|
||||
done <<< "$SRCNAME"
|
||||
) )
|
||||
printf '%q ' $LINE
|
||||
done <<< $SRCNAME
|
||||
) )"
|
||||
|
||||
check_source $PKG ${MD5SUM[$i]} "${SRCNAME[$i]}"
|
||||
case $? in
|
||||
|
@ -1,6 +1,6 @@
|
||||
SBOPKG NEWS
|
||||
|
||||
sbopkg-dev (2018-04-26 00:253:36 UTC)
|
||||
sbopkg-dev (2018-04-27 15:36:23 UTC)
|
||||
FEATURES
|
||||
* sqg: Parallelize building of single and all packages by option -j.
|
||||
Patch by Marcel Saegebarth.
|
||||
@ -37,6 +37,8 @@ sbopkg-dev (2018-04-26 00:253:36 UTC)
|
||||
Patch by Erich Ritz
|
||||
* Fix bug in updates_compare_versions()
|
||||
Patch by arcctgx (#41)
|
||||
* Fix parsing errors with shellcheck.
|
||||
Patch by orbea (#42)
|
||||
|
||||
sbopkg 0.38.1 (2016-09-01 13:42 UTC)
|
||||
FEATURES
|
||||
|
Loading…
Reference in New Issue
Block a user