diff options
author | David Spickett <david.spickett@linaro.org> | 2020-04-27 14:15:51 +0100 |
---|---|---|
committer | David Spickett <david.spickett@linaro.org> | 2020-04-30 09:56:12 +0100 |
commit | 5e5cdf3372932f00151ceff9388165201ebe5106 (patch) | |
tree | 80f8bf9ec3b1ec4605d4348f85e60eac258892ed /tcwg-cleanup-stale-workspaces.sh | |
parent | 49aa56fa328bd43ea470c1c3cda41edbd970a40f (diff) |
Shellcheck fixes round 4
Fixes for:
https://github.com/koalaman/shellcheck/wiki/SC2207
Are using the bash 4.x 'mapfile' syntax where the
input to the array is seperated by newlines.
If it's separated by spaces we use 'read' instead.
Support for selecting libc in MakeRelease.job was
removed in 3fa23da28ad73d0fe4b512c4aab269b5280a6650.
So remove references to "libc" which were expanding
to nothing anyway.
In tcwg-llvm-common.sh PROJECTS->BRANCHED_PROJECTS
is not strictly needed. However shellcheck can't
tell that the local PROJECTS in this file is
different from the PROJECTS in tcwg-llvm-build.sh.
Change-Id: Ie55968e3bf185d0bd5795fe48014636cda1009bc
Diffstat (limited to 'tcwg-cleanup-stale-workspaces.sh')
-rwxr-xr-x | tcwg-cleanup-stale-workspaces.sh | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/tcwg-cleanup-stale-workspaces.sh b/tcwg-cleanup-stale-workspaces.sh index 432ddcfa..f2022ef2 100755 --- a/tcwg-cleanup-stale-workspaces.sh +++ b/tcwg-cleanup-stale-workspaces.sh @@ -45,11 +45,8 @@ find_workspaces () fi } -# Handle dirs with whitespaces by setting $IFS to newline. -SAVEIFS=$IFS -IFS=$'\n' -dirs=($(find_workspaces "$workspace_top")) -IFS=$SAVEIFS +# Splitting on newline in case of dirs with whitespace +mapfile -t dirs < <(find_workspaces "$workspace_top") rm_dirs=() for dir in "${dirs[@]}"; do |