Skip to content

Commit 589b1d0

Browse files
dmullisdmullis
authored andcommitted
Address complaints from shellcheck
1 parent 4475ff8 commit 589b1d0

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

pre-push.sh

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,14 @@ set -x
1212
usage () {
1313
set +x
1414
printf "%s\n\n" "$*"
15-
printf "usage: %s [-w]\n" ${0##*/}
16-
printf "\t%s\t%s\n" ""
17-
printf "\t%s\t%s\n" "$*"
15+
printf "usage: %s [-w]\n" "${0##*/}"
16+
printf "\t%s\n" ""
17+
printf "\t%s\n" "$*"
1818
exit 1
1919
}
2020

2121
TEST_ARGS=
22-
while getopts hg:iw flag
22+
while getopts h:w flag
2323
do
2424
case $flag in
2525
h) usage "";;
@@ -36,7 +36,7 @@ GITHUB_REPOSITORY_OWNER=$USER
3636
CURRENT_BRANCH_NAME=$(git-branch --show-current)
3737
# If the current branch name contains the GitHub username of the owner of the upstream repo,
3838
# assume the intention is to prepare and push a pull request.
39-
if [ $(expr $CURRENT_BRANCH_NAME : ".*$UPSTREAM_OWNER") != 0 ]
39+
if [ $(expr "$CURRENT_BRANCH_NAME" : ".*$UPSTREAM_OWNER") != 0 ]
4040
then
4141
GITHUB_REPOSITORY_OWNER=$UPSTREAM_OWNER
4242
fi

0 commit comments

Comments
 (0)