Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarkus Knauer2012-03-20 16:09:25 +0000
committerMarkus Knauer2012-03-20 16:09:25 +0000
commitbb35e265c8994c6adecff47f6218bf97e74f4da4 (patch)
tree8c938ea6f5602128fb67952bb5db362d9c98045a /releng/org.eclipse.epp.config/tools/functions.sh
parente7b774d8f420dd360c2e1c8634ba8c6c610357cc (diff)
downloadorg.eclipse.epp.packages-bb35e265c8994c6adecff47f6218bf97e74f4da4.tar.gz
org.eclipse.epp.packages-bb35e265c8994c6adecff47f6218bf97e74f4da4.tar.xz
org.eclipse.epp.packages-bb35e265c8994c6adecff47f6218bf97e74f4da4.zip
* added gitCheckout function for Bash scripting
* adjusted startEPPJuno.sh script (CVS->Git) * updated packages_map with Git references
Diffstat (limited to 'releng/org.eclipse.epp.config/tools/functions.sh')
-rw-r--r--releng/org.eclipse.epp.config/tools/functions.sh23
1 files changed, 23 insertions, 0 deletions
diff --git a/releng/org.eclipse.epp.config/tools/functions.sh b/releng/org.eclipse.epp.config/tools/functions.sh
index aa501da8..c60cbafe 100644
--- a/releng/org.eclipse.epp.config/tools/functions.sh
+++ b/releng/org.eclipse.epp.config/tools/functions.sh
@@ -16,6 +16,22 @@ function cvsCheckout {
}
+function gitCheckout {
+ if [ -z $4 ]
+ then
+ echo "No parameters passed to function gitCheckout()."
+ return 0
+ fi
+ GITURL=$1
+ GITPATH=$2
+ GITBRANCH=$3
+ FILENAME=$4
+
+ echo "Checking out ${GITPATH} to ${FILENAME}"
+ git archive --format=tar \
+ --remote=${GITURL} ${GITBRANCH} ${GITPATH} | tar xf - --to-stdout >${FILENAME}
+}
+
function pullAllConfigFiles {
if [ -z $2 ]
then
@@ -32,6 +48,11 @@ function pullAllConfigFiles {
# read relevant (non comment, non empty) lines from package definition map file
ALL_PACKAGES=`grep -v '^#' $1 | grep -v '^\s*$'`
+
+ # name, [CVS,GIT], repository string, path to file, version [HEAD], EPP local filename
+ # cpp,CVS,:pserver:anonymous@dev.eclipse.org:/cvsroot/technology,org.eclipse.epp/packages/org.eclipse.epp.package.cpp.feature/eclipse_cpp_juno.xml,HEAD,cpp.xml
+ # cpp,CVS,:pserver:anonymous@dev.eclipse.org:/cvsroot/technology,org.eclipse.epp/packages/org.eclipse.epp.package.cpp.feature/feature.xml,HEAD,cpp.feature.xml
+
for II in ${ALL_PACKAGES};
do
PACKAGE_NAME=`echo ${II} | cut -d "," -f 1`
@@ -43,6 +64,8 @@ function pullAllConfigFiles {
if [ "${REPTYPE}" = "CVS" ]; then
cvsCheckout ${REPSTRING} ${FILEPATH} ${VERSION} ${2}/${FILENAME}
+ elif [ "${REPTYPE}" = "GIT" ]; then
+ gitCheckout ${REPSTRING} ${FILEPATH} ${VERSION} ${2}/${FILENAME}
fi
ALL_PACKAGE_NAMES="${ALL_PACKAGE_NAMES} ${PACKAGE_NAME}"
done

Back to the top