diff --git a/ansible/www-standalone/resources/scripts/queue-cdn-purge.sh b/ansible/www-standalone/resources/scripts/queue-cdn-purge.sh index 311f67570..f1e236fd1 100644 --- a/ansible/www-standalone/resources/scripts/queue-cdn-purge.sh +++ b/ansible/www-standalone/resources/scripts/queue-cdn-purge.sh @@ -4,7 +4,7 @@ set -e site=$1 -if [ "X$site" != "Xiojs" ] && [ "X$site" != "Xnodejs" ]; then +if [ "$site" != "iojs" ] && [ "$site" != "nodejs" ]; then echo "Usage: queue-cdn-purge.sh < iojs | nodejs > [reason]" exit 1 fi diff --git a/ansible/www-standalone/tools/promote/_promote.sh b/ansible/www-standalone/tools/promote/_promote.sh index b374e2770..352616031 100755 --- a/ansible/www-standalone/tools/promote/_promote.sh +++ b/ansible/www-standalone/tools/promote/_promote.sh @@ -28,7 +28,7 @@ for subdir in $(cd $srcdir && ls); do if [ -d "${srcdir}/${subdir}" ] && [[ $subdir =~ $dirmatch ]]; then resha=no - if [ "X${version}" != "X" ] && [ "X${version}" != "X${subdir}" ]; then + if [ "${version}" != "" ] && [ "${version}" != "${subdir}" ]; then continue fi @@ -49,7 +49,7 @@ for subdir in $(cd $srcdir && ls); do done - if [ "X${version}" == "X" ] && [ "$resha" == "yes" ]; then + if [ -z "${version}" ] && [ "$resha" == "yes" ]; then ${__dirname}/_resha.sh $site $srcdir $dstdir $subdir . ${__dirname}/upload_to_cloudflare.sh $site $subdir fi diff --git a/ansible/www-standalone/tools/promote/_resha.sh b/ansible/www-standalone/tools/promote/_resha.sh index 00d4ef8ee..6c281e3c3 100755 --- a/ansible/www-standalone/tools/promote/_resha.sh +++ b/ansible/www-standalone/tools/promote/_resha.sh @@ -10,22 +10,22 @@ version=$4 __dirname="$(CDPATH= cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" . ${__dirname}/settings -if [ "X${site}" == "X" ]; then +if [ -z "$site" ]; then echo "site argument not provided" exit 1 fi -if [ "X${srcdir}" == "X" ]; then +if [ -z "$srcdir" ]; then echo "srcdir argument not provided" exit 1 fi -if [ "X${dstdir}" == "X" ]; then +if [ -z "$dstdir" ]; then echo "dstdir argument not provided" exit 1 fi -if [ "X${version}" == "X" ]; then +if [ -z "$version" ]; then echo "version argument not provided" exit 1 fi diff --git a/ansible/www-standalone/tools/promote/promote_nightly.sh b/ansible/www-standalone/tools/promote/promote_nightly.sh index a19454ae2..18f1de82c 100755 --- a/ansible/www-standalone/tools/promote/promote_nightly.sh +++ b/ansible/www-standalone/tools/promote/promote_nightly.sh @@ -6,7 +6,7 @@ site=$1 __dirname="$(CDPATH= cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" -if [ "X$site" != "Xiojs" ] && [ "X$site" != "Xnodejs" ]; then +if [ "$site" != "iojs" ] && [ "$site" != "nodejs" ]; then echo "Usage: promote_nightly.sh < iojs | nodejs >" exit 1 fi diff --git a/ansible/www-standalone/tools/promote/promote_release.sh b/ansible/www-standalone/tools/promote/promote_release.sh index f897a6a6a..688476cbf 100755 --- a/ansible/www-standalone/tools/promote/promote_release.sh +++ b/ansible/www-standalone/tools/promote/promote_release.sh @@ -6,12 +6,12 @@ site=$1 __dirname="$(CDPATH= cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" -if [ "X$site" != "Xiojs" ] && [ "X$site" != "Xnodejs" ]; then +if [ "$site" != "iojs" ] && [ "$site" != "nodejs" ]; then echo "Usage: promote_release.sh < iojs | nodejs > " exit 1 fi -if [ "X$2" == "X" ]; then +if [ -z "$2" ]; then echo "Usage: promote_release.sh < iojs | nodejs > " exit 1 fi @@ -34,12 +34,12 @@ while true; do yorn="" read yorn - if [ "X${yorn}" == "Xn" ]; then + if [ "${yorn}" == "n" ]; then echo "Bailing out ..." exit 1 fi - if [ "X${yorn}" == "Xy" ]; then + if [ "${yorn}" == "y" ]; then . ${__dirname}/_promote.sh $site $2 nodejs-latest-linker /home/dist/${site}/release/ /home/dist/${site}/docs/ break diff --git a/ansible/www-standalone/tools/promote/resha_release.sh b/ansible/www-standalone/tools/promote/resha_release.sh index 261533b4e..a6d23ef25 100755 --- a/ansible/www-standalone/tools/promote/resha_release.sh +++ b/ansible/www-standalone/tools/promote/resha_release.sh @@ -4,12 +4,12 @@ site=$1 __dirname="$(CDPATH= cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" -if [ "X$site" != "Xiojs" ] && [ "X$site" != "Xnodejs" ]; then +if [ "$site" != "iojs" ] && [ "$site" != "nodejs" ]; then echo "Usage: resha_release.sh < iojs | nodejs > " exit 1 fi -if [ "X$2" == "X" ]; then +if [ -z "$2" ]; then echo "Usage: resha_release.sh < iojs | nodejs > " exit 1 fi @@ -19,7 +19,7 @@ fi srcdir=$release_srcdir dstdir=$release_dstdir -if [ "X${1}" == "X" ]; then +if [ -z "$1" ]; then echo "Please provide a version string" exit 1 fi diff --git a/ansible/www-standalone/tools/promote/upload_to_cloudflare.sh b/ansible/www-standalone/tools/promote/upload_to_cloudflare.sh index 2ce518948..35d12f2bc 100755 --- a/ansible/www-standalone/tools/promote/upload_to_cloudflare.sh +++ b/ansible/www-standalone/tools/promote/upload_to_cloudflare.sh @@ -4,12 +4,12 @@ set -e site=$1 -if [ "X$site" != "Xiojs" ] && [ "X$site" != "Xnodejs" ]; then +if [ "$site" != "iojs" ] && [ "$site" != "nodejs" ]; then echo "Usage: upload_to_cloudflare.sh < iojs | nodejs > " exit 1 fi -if [ "X$2" == "X" ]; then +if [ -z "$2" ]; then echo "Usage: upload_to_cloudflare.sh < iojs | nodejs > " exit 1 fi