From 48c508064c4465e91ec87203f844b01af8e14d5f Mon Sep 17 00:00:00 2001 From: Sebastian Martinez Date: Wed, 28 Jun 2023 11:34:06 +0200 Subject: [PATCH] surf: make `update-script-platinum` script work on macOS Without the `-r` flag the read command isn't able to extract the values correctly from the comma separated lines on macOS. Signed-off-by: Sebastian Martinez --- radicle-surf/scripts/update-git-platinum.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/radicle-surf/scripts/update-git-platinum.sh b/radicle-surf/scripts/update-git-platinum.sh index 416f9aa..f82328c 100755 --- a/radicle-surf/scripts/update-git-platinum.sh +++ b/radicle-surf/scripts/update-git-platinum.sh @@ -2,7 +2,7 @@ set -euo pipefail # Verify that the script is run from project root. -BASE=$(basename $(pwd)) +BASE=$(basename "$(pwd)") if [ "${BASE}" != "radicle-surf" ] then @@ -30,9 +30,9 @@ git -C "$PLATINUM_REPO" checkout dev input="./data/mock-branches.txt" while IFS= read -r line do - IFS=, read -a pair <<< $line + IFS=, read -ra pair <<< "$line" echo "Creating branch ${pair[0]}" - git -C "$PLATINUM_REPO" update-ref ${pair[0]} ${pair[1]} + git -C "$PLATINUM_REPO" update-ref "${pair[0]}" "${pair[1]}" done < "$input" # Update the archive.