Skip to content
This repository has been archived by the owner on Aug 22, 2024. It is now read-only.

Commit

Permalink
add backward compatible argument parsing
Browse files Browse the repository at this point in the history
  • Loading branch information
wleepang committed Apr 25, 2020
1 parent 2d2dbe5 commit 16b9f97
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ set -x
USAGE=$(cat <<EOF
Install Amazon EBS Autoscale
$0 [options] [-m <mount-point>]
$0 [options] [[-m] <mount-point>]
Options
Expand Down Expand Up @@ -110,6 +110,15 @@ done

eval set -- "$PARAMS"

# for backwards compatibility evaluate positional parameters like previous 2.0.x and 2.1.x releases
# this will be removed in the future
if [ ! -z "PARAMS" ]; then
MOUNTPOINT=$1

if [ ! -z "$2" ]; then
DEVICE=$2
fi
fi

# Install executables
# make executables available on standard PATH
Expand Down

0 comments on commit 16b9f97

Please sign in to comment.