Added example script.
This commit is contained in:
parent
1093ea1625
commit
fbcd681da7
1 changed files with 30 additions and 0 deletions
30
samples/examples.sh
Normal file
30
samples/examples.sh
Normal file
|
@ -0,0 +1,30 @@
|
|||
#!/bin/bash
|
||||
|
||||
# Version 1.0
|
||||
|
||||
if [ $# -eq 0 ]; then
|
||||
echo "Usage: $0 <arg ...>"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# set the examples directories
|
||||
declare -a examples=(
|
||||
"java"
|
||||
"kotlin")
|
||||
|
||||
dir=$(dirname "$(readlink -f "$0")")
|
||||
cyan=$(tput setaf 6)
|
||||
normal=$(tput sgr0)
|
||||
|
||||
i=0
|
||||
for ex in "${examples[@]}"; do
|
||||
if [ $i -ne 0 ]
|
||||
then
|
||||
read -p "Press [Enter] key to continue..."
|
||||
clear
|
||||
fi
|
||||
cd "$dir/$ex" || exit 1
|
||||
echo "> Project: ${cyan}${ex}${normal}"
|
||||
./gradlew --console=plain --no-build-cache clean "$@" || exit 1
|
||||
(( i++ ))
|
||||
done
|
Loading…
Add table
Add a link
Reference in a new issue