2016-10-11 08:58:23 +00:00
|
|
|
#!/bin/bash
|
|
|
|
set -euo pipefail
|
|
|
|
|
|
|
|
if [ ! -e /var/git ]; then
|
|
|
|
cd /var
|
2017-03-15 16:20:39 +00:00
|
|
|
cp -R /opt/app/template git
|
2016-10-11 08:58:23 +00:00
|
|
|
cd git
|
|
|
|
git init
|
|
|
|
git add *
|
|
|
|
echo public >.gitignore
|
|
|
|
git add .gitignore
|
2017-01-11 19:10:39 +00:00
|
|
|
git config user.name sandstorm
|
|
|
|
git config user.email sandstorm@localhost
|
2016-10-11 08:58:23 +00:00
|
|
|
git commit -m "Initial commit."
|
|
|
|
git config receive.denyCurrentBranch ignore
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [ ! -e /var/www ]; then
|
|
|
|
/opt/app/post-receive
|
|
|
|
fi
|
|
|
|
|
|
|
|
cd /opt/app
|
|
|
|
cp post-receive /var/git/.git/hooks
|
2020-04-10 11:29:40 +00:00
|
|
|
|
2020-04-15 02:19:34 +00:00
|
|
|
# cloudcmd wants this in your home directory
|
|
|
|
ln -sf /opt/app/.cloudcmd.menu.js /var/.cloudcmd.menu.js
|
|
|
|
|
2020-04-10 11:29:40 +00:00
|
|
|
npm start
|