29 lines
555 B
Bash
Executable File
29 lines
555 B
Bash
Executable File
#!/bin/bash
|
|
set -euo pipefail
|
|
|
|
if [ ! -e /var/git ]; then
|
|
cd /var
|
|
cp -R /opt/app/template git
|
|
cd git
|
|
git init
|
|
git add *
|
|
echo public >.gitignore
|
|
git add .gitignore
|
|
git config user.name sandstorm
|
|
git config user.email sandstorm@localhost
|
|
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
|
|
|
|
# cloudcmd wants this in your home directory
|
|
ln -sf /opt/app/.cloudcmd.menu.js /var/.cloudcmd.menu.js
|
|
|
|
npm start
|