added script for half-automated cherry-picking all projects
[jprojects-scripts.git] / .jprojects.sh
1 #!/bin/bash
2
3 # Tools repository
4 LIST="jprojects-scripts"
5
6 # Libraries and EJBs
7 LIST="${LIST} \
8         jcore jcoreee \
9         jcore-logger-lib jcore-logger-ejb \
10         jcountry-core jcountry-lib \
11         jphone-core jphone-lib \
12         jcontacts-core jcontacts-business-core jcontacts-lib \
13         juser-core juser-lib \
14         jletter-core jletter-lib jletter-ejb \
15         jaddressbook-core jaddressbook-lib \
16         jmailer-ee \
17         jcore-swing \
18         jcustomer-core jcustomer-lib \
19         jshop-core jshop-ee-lib jshop-ejb \
20         jshop-receipt-lib jshop-receipt-ejb"
21
22 # Applications and their special libs/EJBs
23 LIST="${LIST}
24         pizzaservice-core pizzaservice-lib pizzaservice-mailer pizzaservice-ejb pizzaservice-swing \
25         jjobs-core jjobs-lib jjobs-mailer jjobs-ejb jjobs-war jjobs \
26         jrecruiter-core jrecruiter-lib jrecruiter-mailer jrecruiter-ejb jrecruiter-war jrecruiter \
27         jratecalc-core jratecalc-lib jratecalc-mailer jratecalc-ejb jratecalc-war jratecalc \
28         jlandingpage-core jlandingpage-lib jlandingpage-mailer jlandingpage-ejb jlandingpage-war jlandingpage \
29         jreports-core jreports-lib jreports-mailer jreports-ejb jreports-war jreports \
30         addressbook-core addressbook-lib addressbook-mailer addressbook-ejb addressbook-war addressbook addressbook-uml"
31
32 # BROKEN:
33 LIST="${LIST} addressbook-swing pizzaservice-war pizzaservice"
34
35 # Own home directory
36 declare -r JPROJECTS_HOME="${PWD}"
37
38 # ant binary
39 ANT_BIN=`which ant 2>/dev/null`
40
41 # Test on .git availability"
42 for project in ${LIST}; do
43         if [ ! -d "${project}" ]
44         then
45                 echo "$0: Project '${project}' not created."
46         elif [ ! -f "${project}/.git/config" ]
47         then
48                 echo "$0: Project '${project}' is no GIT project."
49                 exit 1
50         fi
51 done