Created
April 14, 2011 06:06
-
-
Save itechGroup/918976 to your computer and use it in GitHub Desktop.
Скрипт по упаковке сайта на bitrix для его последующего добавления в систему контроля версий
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if test -z $1 | |
then | |
echo "$0 : You must set a project name" | |
exit 1 | |
else | |
if test -d /srv/sites/$1/www/ | |
then | |
# fix permission issues | |
echo "fix permissions" | |
cd /srv/sites/$1/ | |
mkdir www2/ | |
mv www/ www2/ | |
cp -R www2/www/ ./ | |
chgrp -R apache www/ | |
chmod -R 775 www/ | |
rm -rf www2/ | |
#start process | |
cd /srv/sites/$1/www/ | |
#tar upload | |
tar cfj upload.tar.bz2 --exclude=.svn upload | |
rm -rf upload/* | |
#tar bitrix system dirs | |
tar cfj bitrix.tar.bz2 bitrix/cache/ bitrix/gadgets/ bitrix/image_uploader/ bitrix/images/ bitrix/js/ bitrix/managed_cache/ bitrix/otp/ bitrix/sounds/ b> | |
rm -rf bitrix/cache/ bitrix/gadgets/ bitrix/image_uploader/ bitrix/images/ bitrix/js/ bitrix/managed_cache/ bitrix/otp/ bitrix/sounds/ bitrix/stack_cach> | |
#move config | |
cd ../ | |
mv php_interface/dbconn.php php_interface/dbconn.distr.php | |
else | |
echo "There is no such a project" | |
exit 1 | |
fi | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment