Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarkus Knauer2008-04-02 19:52:28 +0000
committerMarkus Knauer2008-04-02 19:52:28 +0000
commit6de534a3bb83dccd295e059d2c70a8a042d93e74 (patch)
treec2e1b66e84072f382fa90ed4540e2a739c35b318 /releng/org.eclipse.epp.config/tools/functions.sh
parent8197ffe67eb4fac8d57fbb418ee4c7fb1449dc92 (diff)
downloadorg.eclipse.epp.packages-6de534a3bb83dccd295e059d2c70a8a042d93e74.tar.gz
org.eclipse.epp.packages-6de534a3bb83dccd295e059d2c70a8a042d93e74.tar.xz
org.eclipse.epp.packages-6de534a3bb83dccd295e059d2c70a8a042d93e74.zip
package config pull enabled
Diffstat (limited to 'releng/org.eclipse.epp.config/tools/functions.sh')
-rw-r--r--releng/org.eclipse.epp.config/tools/functions.sh50
1 files changed, 50 insertions, 0 deletions
diff --git a/releng/org.eclipse.epp.config/tools/functions.sh b/releng/org.eclipse.epp.config/tools/functions.sh
new file mode 100644
index 00000000..aa501da8
--- /dev/null
+++ b/releng/org.eclipse.epp.config/tools/functions.sh
@@ -0,0 +1,50 @@
+
+
+function cvsCheckout {
+ if [ -z $4 ]
+ then
+ echo "No parameters passed to function cvsCheckout()."
+ return 0
+ fi
+ REPSTRING=$1
+ FILEPATH=$2
+ VERSION=$3
+ FILENAME=$4
+
+ echo "Checking out ${FILEPATH} to ${FILENAME}"
+ cvs -q -d ${REPSTRING} checkout -r ${VERSION} -p ${FILEPATH} >${FILENAME}
+}
+
+
+function pullAllConfigFiles {
+ if [ -z $2 ]
+ then
+ echo "No parameters passed to function pullAllConfigFiles()."
+ return 0
+ fi
+
+ if [ ! -d $2 ]
+ then
+ echo "Directory $2 does not exist."
+ return 0
+ fi
+
+ # read relevant (non comment, non empty) lines from package definition map file
+ ALL_PACKAGES=`grep -v '^#' $1 | grep -v '^\s*$'`
+
+ for II in ${ALL_PACKAGES};
+ do
+ PACKAGE_NAME=`echo ${II} | cut -d "," -f 1`
+ REPTYPE=`echo ${II} | cut -d "," -f 2`
+ REPSTRING=`echo ${II} | cut -d "," -f 3`
+ FILEPATH=`echo ${II} | cut -d "," -f 4`
+ VERSION=`echo ${II} | cut -d "," -f 5`
+ FILENAME=`echo ${II} | cut -d "," -f 6`
+
+ if [ "${REPTYPE}" = "CVS" ]; then
+ cvsCheckout ${REPSTRING} ${FILEPATH} ${VERSION} ${2}/${FILENAME}
+ fi
+ ALL_PACKAGE_NAMES="${ALL_PACKAGE_NAMES} ${PACKAGE_NAME}"
+ done
+}
+

Back to the top