Skip to content

Commit 9152af8

Browse files
authored
Merge pull request #45 from hyperupcall/fix-parse-errors
chore: Fix POSIX shell syntax errors
2 parents 1b1e1d6 + 041e6d9 commit 9152af8

File tree

4 files changed

+6
-5
lines changed

4 files changed

+6
-5
lines changed

git-apply-url

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,12 +31,12 @@
3131

3232
URL=$1
3333

34-
function error {
34+
error() {
3535
echo $*
3636
exit 1
3737
}
3838

39-
if [[ ! $URL ]]; then
39+
if [ ! $URL ]; then
4040
error $0 URL
4141
fi
4242

git-closest-match

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,14 @@ else
1212
fi
1313

1414
commit=`for i in $all; do
15-
echo -n "$i "
15+
printf '%s\n' "$i "
1616
# why is there no git diff --shortnumstat ?
1717
git diff -M $spec $i | wc -l
1818
done | sort -k 2 -n | head -n 1 | cut -f 1 -d ' '`
1919
if [ "$mode" = diff ]; then
2020
git log --no-walk $commit | cat -
2121
git diff -M $spec $commit | cat -
2222
else
23-
echo -n "$commit: "
23+
printf '%s\n' "$commit: "
2424
git diff -M $spec $commit | wc -l
2525
fi

git-find-children

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,6 @@ fi
77
for ref in "$@"; do
88
for sha1 in $(git rev-list "$@")
99
do
10+
:
1011
done
1112
done

git-save-home

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515

1616
MODIFIED=$(git status | grep modified | cut -d " " -f 3-)
1717

18-
if [ "x$MODIFIED" == x ]; then
18+
if [ -n "$MODIFIED" ]; then
1919
echo no changes
2020
else
2121
git add -f $MODIFIED \

0 commit comments

Comments
 (0)