Website deployment script

This commit is contained in:
Bob Mottram 2016-01-07 12:14:27 +00:00
parent 697774bf2b
commit 33aa16861c
1 changed files with 27 additions and 0 deletions

27
website/deploy.sh Executable file
View File

@ -0,0 +1,27 @@
#!/bin/bash
lang=$1
dest_dir=$2
if [ ! $lang ]; then
lang='EN'
fi
if [ ! $2 ]; then
echo 'Specify language and destination directory'
exit 1
fi
if [ ! -d $dest_dir ]; then
mkdir -p $dest_dir
fi
if [ ! -d $dest_dir/images ]; then
mkdir $dest_dir/images
fi
cp -r website/* $dest_dir
cp *.css $dest_dir
cp -r ../img/* $dest_dir/images
chown -R www-data:www-data $dest_dir
echo "Website deployed to $dest_dir"
exit 0