fix set -e
This commit is contained in:
13
download.sh
13
download.sh
@ -319,8 +319,17 @@ done
|
||||
# Enforce mutual exclusivity between -c, -p, -f
|
||||
set -- "$collection" "$post" "$file"
|
||||
count=0
|
||||
for x in "$@"; do [[ -n $x ]] && ((count++)); done
|
||||
(( count == 1 )) || { usage; die "Options -c, -p och -f kan inte användas samtidigt (exakt en krävs)."; }
|
||||
for x in "$@"; do
|
||||
if [[ -n $x ]]; then
|
||||
((count++))
|
||||
fi
|
||||
done
|
||||
# Ensure a zero exit status here to avoid set -e exiting if the last test was false
|
||||
true
|
||||
if (( count != 1 )); then
|
||||
usage
|
||||
die "Options -c, -p och -f kan inte användas samtidigt (exakt en krävs)."
|
||||
fi
|
||||
|
||||
lock
|
||||
log "NOOP=$NOOP DEBUG=$DEBUG OUTDIR=$OUTDIR"
|
||||
|
||||
Reference in New Issue
Block a user