Skip to content
Snippets Groups Projects
Commit e753d82f authored by Bob Mottram's avatar Bob Mottram
Browse files

tidying of deploy script

parent 431f8624
No related branches found
No related tags found
No related merge requests found
...@@ -3,28 +3,29 @@ ...@@ -3,28 +3,29 @@
lang=$1 lang=$1
dest_dir=$2 dest_dir=$2
if [ ! $lang ]; then if [ ! "$lang" ]; then
lang='EN' lang='EN'
fi fi
if [ ! $2 ]; then if [ ! "$2" ]; then
echo 'Specify language and destination directory' echo 'Specify language and destination directory'
exit 1 exit 1
fi fi
if [ ! -d $dest_dir ]; then if [ ! -d "$dest_dir" ]; then
mkdir -p $dest_dir mkdir -p "$dest_dir"
fi fi
if [ ! -d $dest_dir/images ]; then if [ ! -d "$dest_dir/images" ]; then
mkdir $dest_dir/images mkdir "$dest_dir/images"
fi fi
cp -r $lang/* $dest_dir cp -r "$lang"/* "$dest_dir"
cp *.css $dest_dir cp *.css "$dest_dir"
cp -r ../img/* $dest_dir/images cp -r ../img/* "$dest_dir/images"
if [ ! -d $dest_dir/downloads ]; then cp -r ../webadmin/EN/help_*.html "$dest_dir"
mkdir $dest_dir/downloads if [ ! -d "$dest_dir/downloads" ]; then
mkdir "$dest_dir/downloads"
fi fi
cp $lang/images.txt $dest_dir/downloads cp "$lang/images.txt" "$dest_dir/downloads"
chown -R www-data:www-data $dest_dir chown -R www-data:www-data "$dest_dir"
echo "Website deployed to $dest_dir" echo "Website deployed to $dest_dir"
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment