From 2c48b287937ff09965416d8c0e64d9f42df7ba4a Mon Sep 17 00:00:00 2001 From: Ameya Shenoy Date: Sun, 1 Apr 2018 00:10:31 +0530 Subject: [PATCH] minor fixes --- vm/build.py | 8 ++++---- vm/vm-develop.json | 2 +- vm/vm-production.json | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/vm/build.py b/vm/build.py index 13cf61a5..30cf7da6 100644 --- a/vm/build.py +++ b/vm/build.py @@ -33,7 +33,7 @@ def install_virtualbox(): check_output(['bench', 'install', 'virtualbox']) def install_packer(): - if not os.path.exits(os.path.join('opt', 'packer')) + if not os.path.exists(os.path.join('/', 'opt', 'packer')): check_output(['bench', 'install', 'packer']) def silent_remove(name, is_dir=False): @@ -77,7 +77,7 @@ def move_to_public(build, file): def generate_md5_hashes(): for build in BUILDS: for file in os.listdir('{} Builds'.format(build)): - if filename.endswith(".ova") or filename.endswith(".box"): + if file.endswith(".ova") or file.endswith(".box"): with open('{} Builds/{}.md5'.format(build, file), 'w') as f: f.write(md5(build, file)) move_to_public(build, file) @@ -118,10 +118,10 @@ def delete_old_vms(): def move_current_vms(): os.mkdir(os.path.join(PUBLIC_DIR, 'BACKUPS')) for file in os.listdir(PUBLIC_DIR): - if file in NEW_FILES or file in SYMLINKS: + if file in NEW_FILES or file in SYMLINKS or file == 'BACKUPS': continue src = os.path.join(PUBLIC_DIR, '{}'.format(file)) - dest = os.path.join(PUBLIC_DIR, 'BACKUPS/{}'file) + dest = os.path.join(PUBLIC_DIR, 'BACKUPS/{}'.format(file)) os.rename(src, dest) if __name__ == "__main__": diff --git a/vm/vm-develop.json b/vm/vm-develop.json index a4927db2..d5173b93 100644 --- a/vm/vm-develop.json +++ b/vm/vm-develop.json @@ -80,7 +80,7 @@ "script": "scripts/debian_family/cleanup.sh" }, { "type": "shell", - "script": "scripts/set_message.sh" + "script": "scripts/set_message_develop.sh" }, { "type": "shell", "execute_command": "echo 'frappe' | {{.Vars}} sudo -S -E bash '{{.Path}}'", diff --git a/vm/vm-production.json b/vm/vm-production.json index c01f1a5a..76d2c3be 100644 --- a/vm/vm-production.json +++ b/vm/vm-production.json @@ -79,7 +79,7 @@ "script": "scripts/debian_family/cleanup.sh" }, { "type": "shell", - "script": "scripts/set_message.sh" + "script": "scripts/set_message_production.sh" }, { "type": "shell", "execute_command": "echo 'frappe' | {{.Vars}} sudo -S -E bash '{{.Path}}'",