Permettre de construire la plate-forme dans un répertoire quelconque
authorFelip Manyer i Ballester <git@res-telae.cat>
Fri, 20 Feb 2015 22:16:00 +0000 (23:16 +0100)
committerFelip Manyer i Ballester <git@res-telae.cat>
Fri, 20 Feb 2015 22:16:00 +0000 (23:16 +0100)
scripts/build.sh

index 46a428b..bb60a10 100755 (executable)
@@ -2,8 +2,14 @@
 set -xe
 
 PREFIX=fonamental
-BUILD_PREFIX=build
 TRANSLATIONS="fr"
+
+if [ "$1" ]; then
+  BUILD_PREFIX="$1"
+else
+  BUILD_PREFIX=build
+fi
+
 PROFILE_NAME=$PREFIX
 DESTINATION=${BUILD_PREFIX}/$PREFIX
 TEMP_NOCORE=${BUILD_PREFIX}/tmp_nocore
@@ -22,8 +28,11 @@ if [ ! -f drupal-org.make ]; then
   exit 1
 fi
 
-# Clean up previous build
-rm -rf $BUILD_PREFIX
+if [ ${BUILD_PREFIX} = 'build' ]; then
+  # Clean up previous build
+  rm -rf $BUILD_PREFIX
+fi
+
 mkdir $BUILD_PREFIX
 
 # Build the profile.