new remote-interface project added
[jprojects-scripts.git] / .jprojects.sh
1 #!/bin/bash
2
3 # Tools repository (this)
4 THIS="jprojects-scripts"
5
6 # Libraries and EJBs
7 LIBRARIES="jcore jcoreee \
8         jcore-logger-lib jcore-logger-ejb \
9         jcountry-core jcountry-lib \
10         jphone-core jphone-lib \
11         jcontacts-core jcontacts-lib \
12         jcontacts-business-core jcontacts-business-lib \
13         juser-core juser-lib \
14         juser-activity-core juser-activity-lib \
15         jletter-core jletter-lib \
16         jaddressbook-core jaddressbook-lib \
17         jaddressbook-share-core jaddressbook-share-lib \
18         jmailer-ee \
19         jcore-swing \
20         jcustomer-core jcustomer-lib \
21         jproduct-core jproduct-lib \
22         jshop-core jshop-ee-lib \
23         jshop-receipt-lib"
24
25 # Applications and their special libs/EJBs
26 APPLICATIONS="pizzaservice-core pizzaservice-lib pizzaservice-mailer pizzaservice-ejb pizzaservice-swing \
27         jjobs-core jjobs-lib jjobs-mailer jjobs-ejb jjobs-war jjobs \
28         jfinancials-core jfinancials-lib jfinancials-mailer jfinancials-ejb jfinancials-war jfinancials
29         addressbook-core addressbook-lib addressbook-mailer addressbook-ejb addressbook-war addressbook addressbook-uml"
30
31 # Company-specific projects
32 COMPANY_APPS="jrecruiter-core jrecruiter-lib jrecruiter-mailer jrecruiter-ejb jrecruiter-war jrecruiter"
33
34 # Broken (needs fixing)
35 BROKEN="addressbook-swing jfinancials-swing pizzaservice-war pizzaservice"
36
37 # Compile list
38 ALL_PROJECTS="${THIS} ${LIBRARIES} ${APPLICATIONS} ${COMPANY_APPS} ${BROKEN}"
39
40 # Own home directory
41 declare -r JPROJECTS_HOME="${PWD}"
42
43 # ant binary
44 ANT_BIN=$(which ant 2>/dev/null)
45
46 # Check binary
47 if [ -z "${ANT_BIN}" ]
48 then
49         echo "$0: Cannot find ANT binary."
50         exit 1
51 fi
52
53 # Test on .git availability"
54 LIST=""
55 for project in ${ALL_PROJECTS}; do
56         if [ ! -d "${project}" ]
57         then
58                 echo "$0: Project '${project}' not created."
59         elif [ ! -f "${project}/.git/config" ]
60         then
61                 echo "$0: Project '${project}' is no GIT project."
62                 exit 1
63         fi
64
65         # Add it as available
66         LIST="${LIST} ${project}"
67 done