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

Commit 16b9f97

Browse files
committed
add backward compatible argument parsing
1 parent 2d2dbe5 commit 16b9f97

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

install.sh

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ set -x
3434
USAGE=$(cat <<EOF
3535
Install Amazon EBS Autoscale
3636
37-
$0 [options] [-m <mount-point>]
37+
$0 [options] [[-m] <mount-point>]
3838
3939
Options
4040
@@ -110,6 +110,15 @@ done
110110

111111
eval set -- "$PARAMS"
112112

113+
# for backwards compatibility evaluate positional parameters like previous 2.0.x and 2.1.x releases
114+
# this will be removed in the future
115+
if [ ! -z "PARAMS" ]; then
116+
MOUNTPOINT=$1
117+
118+
if [ ! -z "$2" ]; then
119+
DEVICE=$2
120+
fi
121+
fi
113122

114123
# Install executables
115124
# make executables available on standard PATH

0 commit comments

Comments
 (0)