Skip to content

Commit

Permalink
dist: long options for scylla_install_pkg
Browse files Browse the repository at this point in the history
Signed-off-by: Takuya ASADA <[email protected]>
  • Loading branch information
syuu1228 committed Feb 16, 2016
1 parent d7a0367 commit 08038e3
Showing 1 changed file with 12 additions and 9 deletions.
21 changes: 12 additions & 9 deletions scripts/scylla_install_pkg
Original file line number Diff line number Diff line change
Expand Up @@ -8,24 +8,27 @@ if [ "`id -u`" -ne 0 ]; then
fi

print_usage() {
echo "scylla_install_pkg -l /home/scylla/rpms -u"
echo " -l install locally built .rpm/.deb on specified directory"
echo " -u use unstable repository"
echo "scylla_install_pkg --local-pkg /home/scylla/rpms --unstable"
echo " --local-pkg install locally built .rpm/.deb on specified directory"
echo " --unstable use unstable repository"
exit 1
}

LOCAL_PKG=
UNSTABLE=0
while getopts l:nh OPT; do
case "$OPT" in
"l")
LOCAL_PKG=$OPTARG
while [ $# -gt 0 ]; do
case "$1" in
"--local-pkg")
LOCAL_PKG=$2
shift 2
;;
"u")
"--unstable")
UNSTABLE=1
shift 1
;;
"h")
*)
print_usage
shift 1
;;
esac
done
Expand Down

0 comments on commit 08038e3

Please sign in to comment.