Skip to content

Commit

Permalink
Allow an 'F' or 'f' prefix when specifying the release
Browse files Browse the repository at this point in the history
This means that one can now use 'F30' or 'f30' in addition to '30' with
the --release flag.
  • Loading branch information
debarshiray committed Oct 26, 2018
1 parent 74bf0e4 commit cf2347f
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions fedora-toolbox
Original file line number Diff line number Diff line change
Expand Up @@ -252,17 +252,23 @@ while [[ "$1" = -* ]]; do
echo "Try '$0 --help' for more information."
exit 1
fi
if ! [ $1 -eq $1 2>&42 ]; then
arg=$(echo $1 | sed 's/^F\|^f//')
if [ "$arg" = "" ]; then
echo "$0: invalid argument for '--release'"
echo "Try '$0 --help' for more information."
exit 1
fi
if [ $1 -le 0 2>&42 ]; then
if ! [ $arg -eq $arg 2>&42 ]; then
echo "$0: invalid argument for '--release'"
echo "Try '$0 --help' for more information."
exit 1
fi
release=$1
if [ $arg -le 0 2>&42 ]; then
echo "$0: invalid argument for '--release'"
echo "Try '$0 --help' for more information."
exit 1
fi
release=$arg
;;
--sudo )
prefix_sudo="sudo"
Expand Down

0 comments on commit cf2347f

Please sign in to comment.