no need for push/popd in sub-shell

This commit is contained in:
Bruno Windels
2018-07-27 14:10:19 +02:00
parent 96374f4e54
commit 5e1517eb4d
6 changed files with 10 additions and 21 deletions
+2 -4
View File
@@ -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
+2 -4
View File
@@ -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
+2 -4
View File
@@ -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