From 33aa16861c5fab63e9d812b7e9394fdc79e75420 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Thu, 7 Jan 2016 12:14:27 +0000 Subject: [PATCH] Website deployment script --- website/deploy.sh | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100755 website/deploy.sh diff --git a/website/deploy.sh b/website/deploy.sh new file mode 100755 index 00000000..725d882b --- /dev/null +++ b/website/deploy.sh @@ -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