From 6ab5a946d9b512889d19ae041002cd78156c3ffc Mon Sep 17 00:00:00 2001 From: Ludovic Pouzenc Date: Wed, 30 Oct 2013 00:50:12 +0100 Subject: Amelioration systeme de build. Les tar ball sont nickel maintenant. --- dist/build_all.sh | 60 ++++++++++++++++++++++++++++++++++++++++--------------- 1 file changed, 44 insertions(+), 16 deletions(-) (limited to 'dist') diff --git a/dist/build_all.sh b/dist/build_all.sh index 8dbb287..9f0306a 100755 --- a/dist/build_all.sh +++ b/dist/build_all.sh @@ -1,10 +1,9 @@ #!/bin/bash function export_files() { - srcbase=$1 - dstbase=$2 + local srcbase=$1 + local dstbase=$2 echo "Copying files..." - IFS=' ' while read src dst do [ -d "$dstbase/$dst" ] || mkdir -p "$dstbase/$dst" @@ -20,9 +19,12 @@ mkdir work/ srcbase=".." dstbase="work/tarball" commit=$(cd $srcbase ; git describe --always HEAD) -archfile=work/editablesite-$commit +buildname=editablesite-$commit +srclocale=$srcbase/locale +dstlocale="$dstbase/$buildname/admin/locale" +archfile=out/$buildname -export_files $srcbase $dstbase </dev/null + done +) echo "Creating tarball..." # Tarball with samples -tar cf $archfile.tar -C "$dstbase" --owner www-data --group www-data . +tar cf $archfile.tar -C "$dstbase" --owner root --group www-data $buildname/ echo "Compressing..." -gzip -9 $archfile.tar -#gzip -9 -c $archfile.tar > $archfile.tar.gz -( cd "$dstbase" ; zip -9 -q -r - .) > $archfile.zip +gzip -9 -c $archfile.tar > $archfile.tar.gz +( cd "$dstbase" ; zip -9 -q -r - $buildname/) > $archfile.zip +rm $archfile.tar + +sudo tar -xf $archfile.tar.gz -C /var/www/ -- cgit v1.2.3