From 9714df1a97fe9f6c53a52ea0aaf3fcc090124992 Mon Sep 17 00:00:00 2001 From: arno Date: Wed, 23 Mar 2011 08:24:01 +0100 Subject: [PATCH] fixes init.sh script (and do not put openlayers in submodule) --- .gitignore | 1 + .gitmodules | 3 --- public/openlayers | 1 - scripts/init.sh | 11 +++++------ scripts/updateopenlayers.sh | 13 +++++++++++++ scripts/updatezend.sh | 17 +++++++++++++++-- 6 files changed, 34 insertions(+), 12 deletions(-) delete mode 160000 public/openlayers create mode 100755 scripts/updateopenlayers.sh diff --git a/.gitignore b/.gitignore index be7a8d5..d8c3835 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,4 @@ generated/mails.txt build/ scripts/lighttpd.conf library/Zend +public/openlayers diff --git a/.gitmodules b/.gitmodules index 7c129cb..d392f02 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,6 +1,3 @@ -[submodule "public/openlayers"] - path = public/openlayers - url = http://github.com/ccnmtl/openlayers.git [submodule "public/modifiablepath"] path = public/modifiablepath url = git://github.com/arenevier/ModifiablePath.git diff --git a/public/openlayers b/public/openlayers deleted file mode 160000 index 27b4b41..0000000 --- a/public/openlayers +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 27b4b4180bbaadf9c808a3ccf9f8d556b926e131 diff --git a/scripts/init.sh b/scripts/init.sh index bbb8817..aa9579d 100755 --- a/scripts/init.sh +++ b/scripts/init.sh @@ -2,12 +2,11 @@ git submodule update --init -git submodule -q foreach " - if ls -A $PWD/patches/\${name##*/} >/dev/null 2>&1; then - git checkout master - git am $PWD/patches/\${name##*/}/* - fi -" +OLDPWD=$PWD +cd public/prototype +rake +cd $OLDPWD sh scripts/updatezend.sh +sh scripts/updateopenlayers.sh sh scripts/reset.postgres.sh -g diff --git a/scripts/updateopenlayers.sh b/scripts/updateopenlayers.sh new file mode 100755 index 0000000..0f99aac --- /dev/null +++ b/scripts/updateopenlayers.sh @@ -0,0 +1,13 @@ +#!/bin/sh +if [ -d public/openlayers ]; then + cd public/openlayers + git checkout master + git pull -u + git checkout syj + git rebase master +else + git clone http://github.com/ccnmtl/openlayers.git public/openlayers + cd public/openlayers + git checkout -b syj + git am ../../patches/openlayers/000* +fi diff --git a/scripts/updatezend.sh b/scripts/updatezend.sh index d707812..90ba32c 100755 --- a/scripts/updatezend.sh +++ b/scripts/updatezend.sh @@ -6,6 +6,7 @@ if [ -f library/Zend/Version.php ]; then php -r "include('library/Zend/Version.php'); exit(Zend_Version::compareVersion(\"$ZEND_VERSION\"));" if [ $? -ne 1 ];then echo no new version + exit fi fi @@ -13,6 +14,18 @@ echo downloading zend $ZEND_VERSION wget http://framework.zend.com/releases/ZendFramework-$ZEND_VERSION/ZendFramework-$ZEND_VERSION-minimal.tar.gz tar zxf ZendFramework-$ZEND_VERSION-minimal.tar.gz -rm -rf library/Zend -mv ZendFramework-$ZEND_VERSION-minimal/library/Zend library/ +if [ -d library/Zend ]; then + rm -rf library/Zend/* +else + mkdir -p library/Zend +fi +mv ZendFramework-$ZEND_VERSION-minimal/library/Zend/* library/Zend/ rm -rf ZendFramework-$ZEND_VERSION-minimal ZendFramework-$ZEND_VERSION-minimal.tar.gz + +cd library/Zend +if [ ! -d .git ]; then + git init . +fi +git add . +git commit -am "importing Zend $ZEND_VERSION" +git tag "Zend/$ZEND_VERSION" -- 2.39.2