Support bash <4.4 in setup.sh

master
Jordan Atwood 2 years ago
parent 757b677235
commit 452d9e8c1a
Signed by: nightfirecat
GPG Key ID: 615A619C2D73A6DF
  1. 5
      setup.sh

@ -14,8 +14,11 @@ DIR="$( dirname "$(readlink -f "${BASH_SOURCE[0]}")" )"
SRC_DIR="$DIR/src" SRC_DIR="$DIR/src"
# read file basenames to copy_files array # read file basenames to copy_files array
readarray -d '' copy_files < <(find "$SRC_DIR" -type f -printf '%f\0') copy_files=()
files_to_remove=() files_to_remove=()
while IFS= read -r -d $'\0'; do
copy_files+=( "$(basename "$REPLY")" )
done < <(find "$SRC_DIR" -type f -print0)
if [ $remove -eq 1 ]; then if [ $remove -eq 1 ]; then
for file in "${copy_files[@]}"; do for file in "${copy_files[@]}"; do

Loading…
Cancel
Save