Skip to content

Commit

Permalink
Helpful script for building/rebuilding/cleaning both: Core project an…
Browse files Browse the repository at this point in the history
…d Plugin project
  • Loading branch information
piwonski committed Jul 9, 2018
1 parent 6b61136 commit 38bc988
Showing 1 changed file with 47 additions and 0 deletions.
47 changes: 47 additions & 0 deletions pluginAndCore.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
#!/bin/sh

usage() {
echo "usage: [[-b | --build] | [-r | --rebuild] | [-c | --clean]]"
}

perform() {
cd CockpitCore
echo ./gradlew $1
./gradlew $1
echo
cd ..

cd CockpitPlugin
echo ./gradlew $1
./gradlew $1
echo
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

0 comments on commit 38bc988

Please sign in to comment.