root/releases/bedework-3.8/util/svncopy.sh

Revision 3412 (checked in by douglm, 2 years ago)

(Partial updates as full update failed with some conflict)

Major refactoring of code to move all jar building into separate projects outside of the main bedework project which itself becomes an assembly project - that is it builds deployable components from the jars and other information.

This change is to facilitate the move to jboss 7.

Further changes are needed but probably no more major reorganization.

Line 
1 #!/bin/bash
2
3 # Copy all the projects in one branch to a new location
4
5 usage() {
6   echo "This script will copy the trunk (or named location) to a new location"
7   echo " "
8   echo " $0 help"
9   echo " $0 (branch | tag | release) name comment-text [ from (branch | tag | release) name]"
10   echo " "
11   echo " par 1: branch tag or release specifies what kind of copy"
12   echo " par 2: name e.g. my-copy or bedework-4.0.1"
13   echo " par 3: comment text"
14   echo " "
15   echo " Examples:"
16   echo '  svncopy branch my-copy "my personal branch"'
17   echo '  svncopy release bedework-4.1 "New release"'
18   echo " "
19   exit
20 }
21
22 # Check a parameter is set
23 #
24 # par 1: branch/tag/release
25 #
26 checkbranchtag() {
27   if [ "${1}x" = "x" ]
28   then
29       usage
30   fi
31
32   case "$1" in
33     branch)
34       BTR="branches"
35       ;;
36     tag)
37       BTR="tags"
38       ;;
39     release)
40       BTR="releases"
41       ;;
42     help)
43       usage
44       ;;
45     *)
46       echo " "
47       echo "**** "
48       echo "**** First parameter must be branch tag or release"
49       echo "**** "
50       echo " "
51       usage
52    esac
53 }
54
55 # Check a parameter is set
56 #
57 # par 1: Name of parameter
58 # par 2: value
59 #
60 check() {
61   if [ "${2}x" = "x" ]
62   then
63     echo " "
64     echo "**** "
65     echo "**** Parameter $1 is not set"
66     echo "**** "
67     echo " "
68     usage
69   fi
70 }
71
72 # ------------------------------------------------------------------
73 # copyproject - copy a single project.
74 #
75 # par 1 - project name
76 # par 2 - destination
77 # par 3 - comment
78 # par 4 - source
79 # ------------------------------------------------------------------
80 copyproject() {
81   echo "copyproject $1 $2 from $4"
82
83   svn copy -m "$3" -rHEAD $SVNREPOSITORY/$1/$4 $SVNREPOSITORY/$1/$2
84 }
85
86 SOURCE="trunk"
87
88 if [ "${4}" = "from" ]
89 then
90   checkbranchtag "$5"
91   check "from-Name" "$6"
92   SOURCE=$BTR/$6
93 fi
94
95 checkbranchtag "$1"
96 check "Name" "$2"
97 check "Comment" "$3"
98
99 SVNREPOSITORY="https://www.bedework.org/svn"
100 TARGET="$BTR/$2"
101 COMMENT="$3"
102
103 PROJECTS=""
104 PROJECTS="$PROJECTS access"
105 PROJECTS="$PROJECTS bedework"
106 #  bwalarms  - later
107 PROJECTS="$PROJECTS bwannotations"
108 PROJECTS="$PROJECTS bwcalcore"
109 PROJECTS="$PROJECTS bwcaldav"
110 PROJECTS="$PROJECTS bwcalFacade"
111 #  bwcrawler - can probably delete
112 PROJECTS="$PROJECTS bwdeployutil"
113 PROJECTS="$PROJECTS bwical"
114 PROJECTS="$PROJECTS bwinterfaces"
115 PROJECTS="$PROJECTS bwmisc"
116 PROJECTS="$PROJECTS bwsysevents"
117 PROJECTS="$PROJECTS bwtools"
118 PROJECTS="$PROJECTS bwtzsvr"
119 PROJECTS="$PROJECTS bwwebapps"
120 PROJECTS="$PROJECTS bwxml"
121 PROJECTS="$PROJECTS cachedfeeder"
122 PROJECTS="$PROJECTS caldav"
123 #  caldavimpl - dropped in 3.8 release
124 PROJECTS="$PROJECTS caldavTest"
125 #  calendarapi - dropped in 3.8 release
126 PROJECTS="$PROJECTS carddav"
127 PROJECTS="$PROJECTS clientapp"
128 #PROJECTS="$PROJECTS contrib"
129 PROJECTS="$PROJECTS davutil"
130 PROJECTS="$PROJECTS dumprestore"
131 #  exchgGateway - later
132 #  exchgsynch - delete this one
133 #   freebusy   - aggregator - not supported
134 PROJECTS="$PROJECTS indexer"
135 PROJECTS="$PROJECTS monitor"
136 PROJECTS="$PROJECTS naming"
137 PROJECTS="$PROJECTS rpiutil"
138 PROJECTS="$PROJECTS synch"
139 #   synchml  - delete?
140 PROJECTS="$PROJECTS testsuite"
141 #   timezones ?
142 #   webapps   dropped in 3.8
143 #   webcache ?
144 PROJECTS="$PROJECTS webdav"
145
146 for project in $PROJECTS
147 do
148    copyproject "$project" "$TARGET" "$COMMENT" "$SOURCE"
149 done
Note: See TracBrowser for help on using the browser.