]> gitweb.fluxo.info Git - puppet-wordpress.git/commitdiff
Fixing invocation checking
authorSilvio Rhatto <rhatto@riseup.net>
Mon, 19 Dec 2011 17:55:53 +0000 (15:55 -0200)
committerSilvio Rhatto <rhatto@riseup.net>
Mon, 19 Dec 2011 17:55:53 +0000 (15:55 -0200)
templates/wordpress.sh.erb

index 60a15e99409ae9c0349f995c39ba9f4e15f5ac59..cb1f08e37c5aec00d9b002fe8b48b9b8abc4f85b 100644 (file)
@@ -28,7 +28,7 @@ function wordpress_check_existing {
 
 # Deploy a fresh wordpress tree
 function wordpress_deploy {
-  if [ "$#" != "1" ]; then
+  if [ -z "$1" ]; then
     echo "Usage: `basename $0` deploy <version> [folder]"
     exit 1
   fi
@@ -48,7 +48,7 @@ function wordpress_deploy {
 
 # Upgrade a wordpress instance using upstream source.
 function wordpress_upgrade {
-  if [ "$#" != "2" ]; then
+  if [ -z "2" ]; then
     echo "Usage: `basename $0` upgrade <old_version> <new_version> [folder]"
     exit 1
   fi