no need for push/popd in sub-shell
This commit is contained in:
parent
96374f4e54
commit
5e1517eb4d
6 changed files with 10 additions and 21 deletions
|
@ -6,15 +6,12 @@ if [[ -d $BASE_DIR/riot-web ]]; then
|
|||
exit
|
||||
fi
|
||||
|
||||
|
||||
pushd $BASE_DIR > /dev/null
|
||||
cd $BASE_DIR
|
||||
curl -L https://github.com/vector-im/riot-web/archive/${RIOT_BRANCH}.zip --output riot.zip
|
||||
unzip riot.zip
|
||||
rm riot.zip
|
||||
mv riot-web-${RIOT_BRANCH} riot-web
|
||||
cp config-template/config.json riot-web/
|
||||
pushd riot-web > /dev/null
|
||||
cd riot-web
|
||||
npm install
|
||||
npm run build
|
||||
popd > /dev/null
|
||||
popd > /dev/null
|
||||
|
|
|
@ -1,10 +1,9 @@
|
|||
PORT=8080
|
||||
echo "running riot on http://localhost:$PORT..."
|
||||
BASE_DIR=$(realpath $(dirname $0))
|
||||
pushd $BASE_DIR > /dev/null
|
||||
cd $BASE_DIR/
|
||||
pushd riot-web/webapp/ > /dev/null
|
||||
python -m SimpleHTTPServer $PORT > /dev/null 2>&1 &
|
||||
PID=$!
|
||||
popd > /dev/null
|
||||
echo $PID > riot.pid
|
||||
popd > /dev/null
|
|
@ -1,6 +1,5 @@
|
|||
BASE_DIR=$(realpath $(dirname $0))
|
||||
pushd $BASE_DIR > /dev/null
|
||||
cd $BASE_DIR
|
||||
PIDFILE=riot.pid
|
||||
kill $(cat $PIDFILE)
|
||||
rm $PIDFILE
|
||||
popd > /dev/null
|
|
@ -12,13 +12,13 @@ if [[ -d $BASE_DIR/$SERVER_DIR ]]; then
|
|||
exit
|
||||
fi
|
||||
|
||||
pushd $BASE_DIR > /dev/null
|
||||
cd $BASE_DIR
|
||||
|
||||
mkdir -p installations/
|
||||
curl https://codeload.github.com/matrix-org/synapse/zip/$SYNAPSE_BRANCH --output synapse.zip
|
||||
unzip synapse.zip
|
||||
mv synapse-$SYNAPSE_BRANCH $SERVER_DIR
|
||||
pushd $SERVER_DIR
|
||||
cd $SERVER_DIR
|
||||
virtualenv -p python2.7 env
|
||||
source env/bin/activate
|
||||
pip install --upgrade pip
|
||||
|
@ -36,5 +36,3 @@ sed -i "s#{{SYNAPSE_PORT}}#${PORT}/#g" homeserver.yaml
|
|||
sed -i "s#{{FORM_SECRET}}#$(uuidgen)#g" homeserver.yaml
|
||||
sed -i "s#{{REGISTRATION_SHARED_SECRET}}#$(uuidgen)#g" homeserver.yaml
|
||||
sed -i "s#{{MACAROON_SECRET_KEY}}#$(uuidgen)#g" homeserver.yaml
|
||||
popd #back to synapse root dir
|
||||
popd #back to wherever we were
|
|
@ -1,7 +1,5 @@
|
|||
BASE_DIR=$(realpath $(dirname $0))
|
||||
pushd $BASE_DIR > /dev/null
|
||||
pushd installations/consent > /dev/null
|
||||
cd $BASE_DIR
|
||||
cd installations/consent
|
||||
source env/bin/activate
|
||||
./synctl start 2> /dev/null
|
||||
popd > /dev/null
|
||||
popd > /dev/null
|
|
@ -1,7 +1,5 @@
|
|||
BASE_DIR=$(realpath $(dirname $0))
|
||||
pushd $BASE_DIR > /dev/null
|
||||
pushd installations/consent > /dev/null
|
||||
cd $BASE_DIR
|
||||
cd installations/consent
|
||||
source env/bin/activate
|
||||
./synctl stop
|
||||
popd > /dev/null
|
||||
popd > /dev/null
|
Loading…
Reference in a new issue