summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIngy döt Net <ingy@ingy.net>2019-12-21 11:05:23 -0800
committerIngy döt Net <ingy@ingy.net>2019-12-21 11:05:23 -0800
commit743c7c67ee4520bf65182f24a31e02724fcd16b5 (patch)
tree591ea3111c3cdd83dadeeb5787190f036c1b4daa
parent7b73fcf75045930398622e76341db8e62ea1e765 (diff)
downloadlibyaml-git-743c7c67ee4520bf65182f24a31e02724fcd16b5.tar.gz
Fix bash according to shellcheck suggestions
-rwxr-xr-xbin/pin5
1 files changed, 2 insertions, 3 deletions
diff --git a/bin/pin b/bin/pin
index 10a900e..42527ab 100755
--- a/bin/pin
+++ b/bin/pin
@@ -1,10 +1,10 @@
#!/bin/bash
(
- while read line; do
+ while read -r line; do
commit_master=$(echo "$line" | cut -f1)
- if (cd ../..; git merge-base --is-ancestor $commit_master HEAD 2>/dev/null); then
+ if (cd ../..; git merge-base --is-ancestor "$commit_master" HEAD 2>/dev/null); then
echo "$line"
exit
fi
@@ -16,4 +16,3 @@
echo -e "HEAD\tHEAD\tHEAD"
) < conf/pin.tsv
-