mirror of
https://github.com/mrworf/plexupdate.git
synced 2025-07-16 02:02:58 -07:00
Merge pull request #80 from demonbane/fix-getopt
Fix to allow combined command-line options
This commit is contained in:
commit
357e716866
1 changed files with 6 additions and 1 deletions
|
@ -165,7 +165,12 @@ usage() {
|
||||||
|
|
||||||
# Parse commandline
|
# Parse commandline
|
||||||
ALLARGS=( "$@" )
|
ALLARGS=( "$@" )
|
||||||
set -- $(getopt acCdfhkopqruU: -- "$@")
|
optstring="acCdfhkopqruU"
|
||||||
|
getopt -T >/dev/null
|
||||||
|
if [ $? -eq 4 ]; then
|
||||||
|
optstring="-o $optstring"
|
||||||
|
fi
|
||||||
|
set -- $(getopt $optstring -- "$@")
|
||||||
while true;
|
while true;
|
||||||
do
|
do
|
||||||
case "$1" in
|
case "$1" in
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue