summaryrefslogtreecommitdiffstats
path: root/tools/deploy.sh
diff options
context:
space:
mode:
Diffstat (limited to 'tools/deploy.sh')
-rwxr-xr-xtools/deploy.sh20
1 files changed, 10 insertions, 10 deletions
diff --git a/tools/deploy.sh b/tools/deploy.sh
index 109cc32..d226686 100755
--- a/tools/deploy.sh
+++ b/tools/deploy.sh
@@ -12,24 +12,24 @@ export GERRIT_REFSPEC=${GERRIT_REFSPEC:-master}
export TERM_OPTS=${TERM_OPTS:-" "}
-TMP_DIR=$(mktemp -d)
-cd $TMP_DIR
-
-trap "{ sudo rm -rf $TMP_DIR; }" EXIT
+## Source Environment Variables.
help() {
echo "Usage: deploy.sh <site_name> <deploy_site|update_site>"
}
-## Source Environment Variables.
-
if [[ $# -ne 2 ]]
then
help
exit 1
fi
-source ../site/$1/$1.env
+source $(dirname "$(realpath $0)")/../site/$1/$1.env
+
+TMP_DIR=$(mktemp -d)
+cd $TMP_DIR
+
+trap "{ sudo rm -rf $TMP_DIR; }" EXIT
## Deps
@@ -151,20 +151,20 @@ create_public_network() {
public-network
}
-case "$1" in
+case "$2" in
'deploy_site')
genesis_cleanup
clone_repos
pegleg_collect
promenade_bundle
genesis_deploy
- site_action $1
+ site_action $2
create_public_network
;;
'update_site')
clone_repos
pegleg_collect
- site_action $1
+ site_action $2
;;
*) help
exit 1