misc: fix few shellcheck issues in archive-branches.sh
License: MIT Signed-off-by: Jakub Sztandera <kubuxu@protonmail.ch>
Jakub Sztandera committed
Aug 10, 2017 at 19:21 UTC
345519e0260e123774277588547c9c61f04a32ea
1 file changed
+2
-2
bin/archive-branches.sh
+2
-2
@@ -21,7 +21,7 @@ gh_api_next() {
21
echo "$links" | grep '; rel="next"' >/dev/null || return
22
link=$(echo "$links" | grep '; rel="next"' | sed -e 's/^<//' -e 's/>.*//')
23
24
- curl $auth -f -sD >(gh_api_next) $link
24
+ curl $auth -f -sD >(gh_api_next) "$link"
25
}
26
27
gh_api() {
@@ -50,7 +50,7 @@ git remote add archived "git@github.com:$org/$arch_repo.git" || true
50
51
cat <(active_branches) <(pr_branches) <((IFS=$'\n'; echo "${exclusions[*]}")) \
52
| sort -u | comm - <(origin_refs | sort) -13 |\
53
- while read ref; do
53
+ while read -r ref; do
54
git push archived "origin/$ref:refs/heads/$ref/$(date --rfc-3339=date)"
55
git push origin --delete "$ref"
56
done