From: Stephen Rothwell Date: Thu, 24 Nov 2022 23:54:40 +0000 (+1100) Subject: fix some shellcheck warnings X-Git-Url: https://git.ozlabs.org/?a=commitdiff_plain;h=f443e2ae8bbf29c0cc6923309dd978cf5f54c85b;p=next-scripts fix some shellcheck warnings --- diff --git a/common.sh b/common.sh index 53bcaa9..7529de3 100644 --- a/common.sh +++ b/common.sh @@ -6,7 +6,7 @@ [ "$_next_common_included" ] && return 0 _next_common_included=1 -bin_dir=$(realpath $(dirname "$0")) +bin_dir=$(realpath "$(dirname "$0")") top_dir=$(dirname "$bin_dir") [ "$LOG_FILE" ] || LOG_FILE="$top_dir/merge.log" @@ -51,17 +51,17 @@ export NEXT_J_FACTOR="$j_factor" # Support functions get_contacts() { - awk -F '\t' '/^[^#]/ && $3=="'"$1"'" { print $1; }' $CTRL_FILE + awk -F '\t' '/^[^#]/ && $3=="'"$1"'" { print $1; }' #$CTRL_FILE" } get_url() { - awk -F '\t' '/^[^#]/ && $3=="'"$1"'" { print $4; }' $CTRL_FILE + awk -F '\t' '/^[^#]/ && $3=="'"$1"'" { print $4; }' #$CTRL_FILE" } get_build_flag() { - awk -F '\t' '/^[^#]/ && $3=="'"$1"'" { print $6; }' $CTRL_FILE + awk -F '\t' '/^[^#]/ && $3=="'"$1"'" { print $6; }' #$CTRL_FILE" } check_unmerged_files() @@ -74,7 +74,7 @@ check_unmerged_files() if [ "$um_files" ] && [ -f "../merge-files/$tree" ]; then rm_files=$(grep -F "$um_files" "../merge-files/$tree") if [ "$rm_files" ]; then - "$bin_dir/do_rm" $rm_files + "$bin_dir/do_rm" "$rm_files" fi fi }