Skip to content

Commit

Permalink
Code review changes:
Browse files Browse the repository at this point in the history
- handling only first flag
  • Loading branch information
piwonski committed Jul 10, 2018
1 parent 38bc988 commit e790492
Showing 1 changed file with 15 additions and 24 deletions.
39 changes: 15 additions & 24 deletions pluginAndCore.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,30 +18,21 @@ perform() {
cd ..
}

# http://linuxcommand.org/lc3_wss0120.php
if [ "$1" = "" ]
then
usage
exit 1
fi

# https://stackoverflow.com/a/16349776/4137318
cd "${0%/*}"

while [ "$1" != "" ]; do
case $1 in
-b | --build ) perform build
exit
;;
-c | --clean ) perform clean
exit
;;
-r | --rebuild ) perform clean
perform build
exit
;;
* ) usage
exit 1
esac
shift
done
# http://linuxcommand.org/lc3_wss0120.php
case $1 in
-b | --build ) perform build
exit
;;
-c | --clean ) perform clean
exit
;;
-r | --rebuild ) perform clean
perform build
exit
;;
* ) usage
exit 1
esac

0 comments on commit e790492

Please sign in to comment.