-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathupdate.sh
executable file
·36 lines (34 loc) · 1.82 KB
/
update.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#!/usr/bin/bash
echo "$(date) $line checking for updates..."
output=$( git fetch --dry-run 2>&1 )
if [[ $output ]]
then
echo "$(date) $line Updates found"
source ~/.rvm/scripts/rvm
rvm 2.6.5@website
git pull
jekyll build
echo "$(date) $line Copying index.html to Hyrax"
cp /var/www/spe_website/_site/index.html /var/www/hyrax-UAlbany/public
cp /var/www/spe_website/_site/404.html /var/www/hyrax-UAlbany/public/404.html
cp /var/www/spe_website/_site/422.html /var/www/hyrax-UAlbany/public/422.html
cp /var/www/spe_website/_site/500.html /var/www/hyrax-UAlbany/public/500.html
cp /var/www/spe_website/_site/404.html /var/www/arclight-UAlbany/public/404.html
cp /var/www/spe_website/_site/422.html /var/www/arclight-UAlbany/public/422.html
cp /var/www/spe_website/_site/500.html /var/www/arclight-UAlbany/public/500.html
cp /var/www/spe_website/_site/404.html /var/www/history/public/404.html
cp /var/www/spe_website/_site/422.html /var/www/history/public/422.html
cp /var/www/spe_website/_site/500.html /var/www/history/public/500.html
cp /var/www/spe_website/_site/404.html /var/www/espy/public/404.html
cp /var/www/spe_website/_site/422.html /var/www/espy/public/422.html
cp /var/www/spe_website/_site/500.html /var/www/espy/public/500.html
cp /var/www/spe_website/_site/404.html /var/www/books/public/404.html
cp /var/www/spe_website/_site/422.html /var/www/books/public/422.html
cp /var/www/spe_website/_site/500.html /var/www/books/public/500.html
cp /var/www/spe_website/_site/404.html /var/www/bento-UAlbany/public/404.html
cp /var/www/spe_website/_site/422.html /var/www/bento-UAlbany/public/422.html
cp /var/www/spe_website/_site/500.html /var/www/bento-UAlbany/public/500.html
echo "$(date) $line Done"
else
echo "$(date) $line No updates"
fi