equal
deleted
inserted
replaced
|
1 #!/bin/bash |
|
2 # yant.sh - Made for Puppi |
|
3 # Sources common header for Puppi scripts |
|
4 . $(dirname $0)/header || exit 10 |
|
5 |
|
6 # Show help |
|
7 showhelp () { |
|
8 echo "This script is used to call ant in a hybris-system" |
|
9 echo "It requires AT LEAST 2 arguments:" |
|
10 echo "First the \${hybris_parent_dir} where it can find a hybris-directory" |
|
11 echo "Second argument: Everything you want to pass through to ant" |
|
12 echo "The script assumes that hybris is located in \${hybris_parent_dir}/hybris" |
|
13 echo |
|
14 echo "Examples:" |
|
15 echo "yant.sh /home/hybris clean all" |
|
16 } |
|
17 |
|
18 # Unfortunately, showhelp will never be called |
|
19 |
|
20 cd $1/hybris/bin/platform |
|
21 . ./setantenv.sh |
|
22 |
|
23 # somehow dirty ... |
|
24 shift |
|
25 |
|
26 if [ -d /opt/hybris/config ]; then |
|
27 template="" |
|
28 else |
|
29 template=-Dinput.template=develop |
|
30 fi |
|
31 |
|
32 if [ $debug ] ; then |
|
33 ant -Dinput.template=develop $* |
|
34 else |
|
35 ant $* > /dev/null |
|
36 fi |
|
37 |
|
38 handle_result |