Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 964c798

Browse files
committed
Use getopt where possible, so this supports option letters that get
jammed together on thos platforms.
1 parent 3706855 commit 964c798

1 file changed

Lines changed: 10 additions & 1 deletion

File tree

Doc/tools/push-docs.sh

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,16 @@ fi
2929
EXPLANATION=''
3030
ANNOUNCE=true
3131

32-
# XXX Should use getopt(1) here.
32+
getopt -T >/dev/null
33+
if [ $? -eq 4 ] ; then
34+
# We have a sufficiently useful getopt(1) implementation.
35+
set -- `getopt -ssh m:p:qt:F: "$@"`
36+
else
37+
# This version of getopt doesn't support quoting of long options
38+
# with spaces, so let's not rely on it at all.
39+
:
40+
fi
41+
3342
while [ "$#" -gt 0 ] ; do
3443
case "$1" in
3544
-m)

0 commit comments

Comments
 (0)