2021-09-03 18:16:50 -04:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
|
|
|
set -ex
|
2021-09-11 17:17:28 -04:00
|
|
|
ulimit -u 512
|
2021-09-03 18:16:50 -04:00
|
|
|
|
2021-09-03 18:34:56 -04:00
|
|
|
DIR=$(mktemp --directory)
|
2021-11-22 12:47:00 -05:00
|
|
|
# set USE_LDAP to true to generate member list using LDAP database
|
|
|
|
export USE_LDAP=true
|
2021-09-03 18:16:50 -04:00
|
|
|
|
2021-09-03 18:34:56 -04:00
|
|
|
pushd $DIR
|
|
|
|
|
|
|
|
git clone https://git.csclub.uwaterloo.ca/www/www-new.git --depth=1
|
2021-09-03 18:16:50 -04:00
|
|
|
|
|
|
|
cd www-new
|
|
|
|
|
|
|
|
npm install
|
|
|
|
npm run build
|
|
|
|
npm run export
|
|
|
|
|
2021-09-03 18:34:56 -04:00
|
|
|
chgrp -R www out
|
|
|
|
chmod -R g+w out
|
2021-09-03 18:16:50 -04:00
|
|
|
|
|
|
|
shopt -s dotglob
|
|
|
|
|
|
|
|
rm -rf /srv/www-csc/*
|
|
|
|
mv out/* /srv/www-csc/
|
2021-09-03 18:34:56 -04:00
|
|
|
|
|
|
|
popd
|
|
|
|
|
2021-09-11 17:17:28 -04:00
|
|
|
rm -rf $DIR
|