]> dev.renevier.net Git - syp.git/blobdiff - build.sh
bump to version 0.4
[syp.git] / build.sh
index 897ccb0824ac792eed2e25e80f37a17a422f636f..216a2ad41fe38127adf0cea6e00cc46415c4925e 100755 (executable)
--- a/build.sh
+++ b/build.sh
@@ -2,7 +2,7 @@
 
 set -e
 
-PROJVERS=0.1
+PROJVERS=0.4
 PROJNAME=syp
 
 BUILDDIR=${1:-build}
@@ -13,9 +13,11 @@ mkdir -p $DESTDIR
 
 # php includes
 cp -RLp inc/ $DESTDIR/
+# removes generated settings in case it exists
+rm -f $DESTDIR/inc/settings.php
 
 # other php files
-cp -p admin.*php index.*php wizard.*php news.php api.php items.php logout.php $DESTDIR/
+cp -p admin.*php index.*php upgrade.*php install.*php news.php api.php items.php logout.php $DESTDIR/
 
 # media
 cp -RLp media/ $DESTDIR/
@@ -30,12 +32,10 @@ cp -RLp openlayers/build/OpenLayers.js $DESTDIR/openlayers/
 # openlayers images
 mkdir $DESTDIR/openlayers/img
 for file in east-mini.png \
-            marker-gold.png \
             north-mini.png \
+            blank.gif \
             west-mini.png \
             zoom-plus-mini.png \
-            marker-blue.png \
-            marker-green.png \
             south-mini.png \
             zoom-minus-mini.png \
             zoom-world-mini.png; do
@@ -56,15 +56,19 @@ for file in $DESTDIR/js/jquery-*.min.js; do
     mv $file $DESTDIR/js/jquery-$jversion.js
 done
 
-# copyright and readme files
-cp -p license.txt README.txt COPYING.txt $DESTDIR/
+# copyright and readme and changes files
+cp -p license.txt COPYING.txt README.txt CHANGES.txt $DESTDIR/
 
 # creates upload directory
-mkdir $DESTDIR/upload
-chmod a+wx $DESTDIR/upload
+mkdir -p $DESTDIR/upload/_thumbs
+chmod -R a+wx $DESTDIR/upload
 
 # generate sources
 cd $BUILDDIR
 tar -pczf ${PROJNAME}_${PROJVERS}.tar.gz ${PROJNAME}-${PROJVERS}
 zip -r ${PROJNAME}_${PROJVERS}.zip ${PROJNAME}-${PROJVERS}
 cd ..
+
+if [ -d .git/ ] && which git > /dev/null; then
+    git checkout openlayers
+fi