20 lines
517 B
Bash
Executable File

#!/bin/bash
# Creates a ZIP archive of all important files and uploads
# it via scp. You are prompted for the exact path and
# need to extract the archive on the server afterwards.
dirname=mut-$(date +"%Y%m%d%H%M%S")
echo "Creating zip file …"
mkdir $dirname
for i in css images includes index.html js lib sections plugin; do
cp -r $i $dirname/$i
done;
(zip -r $dirname.zip $dirname) 1> /dev/null
rm -rf $dirname
echo -n "Enter scp destination: "
read destination
scp $dirname.zip $destination
rm $dirname.zip