Commit 9a597e7a by John Jarvis

fixing some syntax

parent e3d0f803
...@@ -54,7 +54,7 @@ ...@@ -54,7 +54,7 @@
- name: edx_ansible | create update script - name: edx_ansible | create update script
template: > template: >
dest={{ edx_ansible_app_dir}}/update dest={{ edx_ansible_app_dir}}/update
src=update owner=edx_ansible group=edx_ansible mode=755 src=update.j2 owner={{ edx_ansible_user }} group={{ edx_ansible_user }} mode=755
- name: edxapp | create a symlink for update.sh - name: edxapp | create a symlink for update.sh
file: > file: >
......
...@@ -20,7 +20,7 @@ IFS=$SAVE_IFS ...@@ -20,7 +20,7 @@ IFS=$SAVE_IFS
} }
declare -A repos_to_cmd declare -A repos_to_cmd
edx_ansible_cmd="edx_ansible-playbook -c local -vvvv --tags deploy" edx_ansible_cmd="{{ edx_ansible_venv_bin}}/ansible-playbook -i localhost, -c local -vvvv --tags deploy"
repos_to_cmd["edx-platform"]="$edx_ansible_cmd edxapp.yml -e 'edx_platform_version=$2'" repos_to_cmd["edx-platform"]="$edx_ansible_cmd edxapp.yml -e 'edx_platform_version=$2'"
repos_to_cmd["xqueue"]="$edx_ansible_cmd xqueue.yml -e 'xqueue_version=$2'" repos_to_cmd["xqueue"]="$edx_ansible_cmd xqueue.yml -e 'xqueue_version=$2'"
repos_to_cmd["forums"]="$edx_ansible_cmd forums.yml -e 'forum_version=$2'" repos_to_cmd["forums"]="$edx_ansible_cmd forums.yml -e 'forum_version=$2'"
...@@ -43,16 +43,17 @@ while getopts "vh" opt; do ...@@ -43,16 +43,17 @@ while getopts "vh" opt; do
esac esac
done done
if [[ -z ${repos_to_cmd[$1]} ]]; then
if [[ -z $1 || -z $2 ]]; then
echo echo
echo "ERROR: Invalid repo name" echo "ERROR: You must specify a repo and commit"
usage usage
exit 1 exit 1
fi fi
if [[ -z $2 ]]; then if [[ -z ${repos_to_cmd[$1]} ]]; then
echo echo
echo "ERROR: You must specify a commit or tag" echo "ERROR: Invalid repo name"
usage usage
exit 1 exit 1
fi fi
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment