rsync
#!/bin/bash
work_dir=”/home/steve/workspace/va_temp2016″
work_t2016e=$work_dir/themes/twentysixteen-english
www_dir=”/var/www/va.tst/public_html”
www_t2016e=$www_dir/wp-content/themes/twentysixteen-english
user_work=”steve”
group_work=”steve”
clear
echo “** Menu **”
echo “0 checkout twentysixeeen-english”
echo “1 checkin twentysixteen-english”
read menuchoice
if [ $menuchoice = 0 ]
then echo “checking out tweentysixteen-english”
rsync -av –chown $user_work:$group_work $www_t2016e/ $work_t2016e
elif [ $menuchoice = 1 ]
then echo “checking in tweentysixteen-english”
sudo rsync -auv –chown root:root $work_t2016e/ $www_t2016e
fi
Leave a Reply