mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2024-11-22 01:36:29 -05:00
42 lines
833 B
Text
42 lines
833 B
Text
|
#!/bin/bash
|
||
|
|
||
|
# run command at repo root
|
||
|
CURRENT_PATH=$PWD
|
||
|
cd $(git rev-parse --show-toplevel)
|
||
|
|
||
|
if ! type npm > /dev/null
|
||
|
then
|
||
|
echo "npm is not installed, please install via nvm(recommended) or package manager"
|
||
|
echo "setup will not be run"
|
||
|
exit 0
|
||
|
fi
|
||
|
|
||
|
if ! type bower > /dev/null
|
||
|
then
|
||
|
echo "bower is not installed, install via npm"
|
||
|
npm install -g bower
|
||
|
fi
|
||
|
|
||
|
echo "copy config files"
|
||
|
cp config.json.example config.json
|
||
|
cp public/js/common.js.example public/js/common.js
|
||
|
cp .sequelizerc.example .sequelizerc
|
||
|
|
||
|
echo "install npm and bower packages"
|
||
|
npm install && bower install
|
||
|
|
||
|
cat << EOF
|
||
|
|
||
|
|
||
|
Edit the following config file to setup hackmd server and client.
|
||
|
Read more info at https://github.com/hackmdio/hackmd#configuration-files
|
||
|
|
||
|
- config.json
|
||
|
- public/js/common.js
|
||
|
- .sequelizerc
|
||
|
|
||
|
EOF
|
||
|
|
||
|
# change directory back
|
||
|
cd $CURRENT_PATH
|