shellcheck

This commit is contained in:
Serge Schneider
2018-03-02 20:08:24 +00:00
parent 56da271499
commit ff2d5edee1
26 changed files with 203 additions and 194 deletions

View File

@@ -1,5 +1,5 @@
log (){
date +"[%T] $@" | tee -a "${LOG_FILE}"
date +"[%T] $*" | tee -a "${LOG_FILE}"
}
export -f log
@@ -15,10 +15,10 @@ bootstrap(){
local BOOTSTRAP_CMD=debootstrap
fi
capsh --drop=cap_setfcap -- -c "${BOOTSTRAP_CMD} --components=main,contrib,non-free \
capsh --drop=cap_setfcap -- "${BOOTSTRAP_CMD}" --components=main,contrib,non-free \
--arch armhf \
--keyring "${STAGE_DIR}/files/raspberrypi.gpg" \
$1 $2 $3" || rmdir "$2/debootstrap"
"$1" "$2" "$3" || rmdir "$2/debootstrap"
}
export -f bootstrap

View File

@@ -10,11 +10,11 @@ dependencies_check()
for depfile in "$@"; do
if [[ -e "$depfile" ]]; then
deps="$(sed -f "${SCRIPT_DIR}/remove-comments.sed" < ${BASE_DIR}/depends)"
deps="$(sed -f "${SCRIPT_DIR}/remove-comments.sed" < "${BASE_DIR}/depends")"
fi
for dep in $deps; do
if ! hash ${dep%:*} 2>/dev/null; then
if ! hash "${dep%:*}" 2>/dev/null; then
missing="${missing:+$missing }${dep#*:}"
fi
done