diff --git a/Core/Frameworks/Baikal/Scripts/package-flat.sh b/Core/Frameworks/Baikal/Scripts/package-flat.sh index 05bfd0c..39560f9 100755 --- a/Core/Frameworks/Baikal/Scripts/package-flat.sh +++ b/Core/Frameworks/Baikal/Scripts/package-flat.sh @@ -8,17 +8,16 @@ echo "# by their target). Useful for FTP deployment" echo "#" echo "#" -BRANCH="master" -SRCDIR="../../../../" -TEMPDIR="/tmp/baikal-flat-`date +%Y-%m-%d-%H-%M-%S`-temp" -TEMPDIRDEREFERENCE="/tmp/baikal-flat-`date +%Y-%m-%d-%H-%M-%S`" +TEMPDATE="`date +%Y-%m-%d-%H-%M-%S`" +TEMPDIR="/tmp/baikal-flat-$TEMPDATE-temp" +TEMPARCHIVE="$TEMPDIR/temparchive.tgz" +TEMPDIRDEREFERENCE="/tmp/baikal-flat-$TEMPDATE" # Export Project -mkdir $TEMPDIR - -BASEDIR="`dirname $0`" -PATH_this="`cd $BASEDIR && cd $SRCDIR && pwd`/" -git archive $BRANCH | tar -x -C $TEMPDIR +# Requires the git-archive-all script by https://github.com/Kentzo (https://github.com/Kentzo/git-archive-all) +mkdir $TEMPDIR && \ +git-archive-all --force-submodules $TEMPARCHIVE && \ +cd $TEMPDIR && tar -xzf $TEMPARCHIVE && rm $TEMPARCHIVE && \ # Dereferencig symlinks cp -RfL $TEMPDIR $TEMPDIRDEREFERENCE && \ @@ -29,43 +28,34 @@ TEMPDIR=$TEMPDIRDEREFERENCE && \ # Jump to tempdir cd $TEMPDIR && \ -# Cleaning git stuff -rm .gitignore - -# Cleaning CoreVersions -rm -Rf CoreVersions - -# Cleaning FrameworksVersions -rm -Rf Core/Frameworks/Versions - # Cleaning Resources -rm -f Core/Resources/Web/README.md -rm -Rf Core/Resources/Web/TwitterBootstrap +rm -f Core/Resources/Web/README.md && \ +rm -Rf Core/Resources/Web/TwitterBootstrap && \ # Cleaning Scripts -rm -Rf Core/Scripts -rm -Rf Core/Frameworks/Baikal/Scripts +rm -Rf Core/Scripts && \ +rm -Rf Core/Frameworks/Baikal/Scripts && \ # Cleaning WWWRoot -rm -Rf Core/Frameworks/Baikal/WWWRoot -rm -Rf Core/Frameworks/BaikalAdmin/WWWRoot +rm -Rf Core/Frameworks/Baikal/WWWRoot && \ +rm -Rf Core/Frameworks/BaikalAdmin/WWWRoot && \ # Cleaning Specific/Virtualhosts -rm -Rf Specific/virtualhosts +rm -Rf Specific/virtualhosts && \ # Moving HTML roots -mv html/* . -mv html/.htaccess . -rm -Rf html +mv html/* . && \ +mv html/.htaccess . && \ +rm -Rf html && \ # Tagging Distrib cat Core/Distrib.php | sed -e "s/\"regular\"/\"flat\"/g" > Core/Distrib2.php && \ rm -f Core/Distrib.php && \ -mv Core/Distrib2.php Core/Distrib.php +mv Core/Distrib2.php Core/Distrib.php && \ # Deploy empty DB -mkdir -p Specific/db -cp Core/Resources/Db/SQLite/db.sqlite Specific/db +mkdir -p Specific/db && \ +cp Core/Resources/Db/SQLite/db.sqlite Specific/db && \ # Displaying result echo "# "$TEMPDIR diff --git a/Core/Frameworks/Baikal/Scripts/package-regular.sh b/Core/Frameworks/Baikal/Scripts/package-regular.sh index 4d78271..50d6bb0 100644 --- a/Core/Frameworks/Baikal/Scripts/package-regular.sh +++ b/Core/Frameworks/Baikal/Scripts/package-regular.sh @@ -7,30 +7,26 @@ echo "# Packaging project for regular distribution" echo "#" echo "#" -BRANCH="master" -SRCDIR="../../../../" -TEMPDIR="/tmp/baikal-regular-`date +%Y-%m-%d-%H-%M-%S`" +TEMPDATE="`date +%Y-%m-%d-%H-%M-%S`" +TEMPDIR="/tmp/baikal-regular-$TEMPDATE" +TEMPARCHIVE="$TEMPDIR/temparchive.tgz" # Export Project -mkdir $TEMPDIR - -BASEDIR="`dirname $0`" -PATH_this="`cd $BASEDIR && cd $SRCDIR && pwd`/" -git archive $BRANCH | tar -x -C $TEMPDIR +# Requires the git-archive-all script by https://github.com/Kentzo (https://github.com/Kentzo/git-archive-all) +mkdir $TEMPDIR && \ +git-archive-all --force-submodules $TEMPARCHIVE && \ +cd $TEMPDIR && tar -xzf $TEMPARCHIVE && rm $TEMPARCHIVE && \ # Jump to tempdir cd $TEMPDIR && \ -# Cleaning git stuff -rm .gitignore - # Cleaning Scripts -rm -Rf Core/Scripts -rm -Rf Core/Frameworks/Baikal/Scripts +rm -Rf Core/Scripts && \ +rm -Rf Core/Frameworks/Baikal/Scripts && \ # Deploy empty DB -mkdir -p Specific/db -cp Core/Resources/Db/SQLite/db.sqlite Specific/db +mkdir -p Specific/db && \ +cp Core/Resources/Db/SQLite/db.sqlite Specific/db && \ # Displaying result echo "# "$TEMPDIR