aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2012-11-15 13:31:13 -0200
committerSilvio Rhatto <rhatto@riseup.net>2012-11-15 13:31:13 -0200
commit1c14f237b6dce43f7439a939d356595daf081eb8 (patch)
tree198b24fb83ee32539c9541221424fe0fcc39d415
parent7fe232d8e15ca72d03848451ae0cd6be71d62df1 (diff)
downloadpuppet-drupal-1c14f237b6dce43f7439a939d356595daf081eb8.tar.gz
puppet-drupal-1c14f237b6dce43f7439a939d356595daf081eb8.tar.bz2
Using $command instead of $1
-rw-r--r--templates/drupal.sh.erb18
1 files changed, 10 insertions, 8 deletions
diff --git a/templates/drupal.sh.erb b/templates/drupal.sh.erb
index 04bce65..5695320 100644
--- a/templates/drupal.sh.erb
+++ b/templates/drupal.sh.erb
@@ -50,12 +50,14 @@ function drupal_check_not_existing {
# Iterate through all drupal instances
function drupal_iterate {
- if [ -z "$1" ]; then
+ local command="$1"
+
+ if [ -z "$command" ]; then
return
fi
- if [ "$1" != "cron" ] && [ "$SILENT" != "yes" ]; then
- echo "Issuing $1 in all installed instances..."
+ if [ "$command" != "cron" ] && [ "$SILENT" != "yes" ]; then
+ echo "Issuing $command in all installed instances..."
fi
for version in $SERIES; do
@@ -77,15 +79,15 @@ function drupal_iterate {
if [ -e "$drupal/settings.php" ]; then
hash="`sha1sum $drupal/settings.php | cut -d ' ' -f 1`"
# Process sites just once, avoiding symlinks
- if echo $settings_hash | grep -q -v "$1:$hash"; then
- settings_hash="$settings_hash-$1:$hash"
- if [ "$1" != "cron" ] && [ "$SILENT" != "yes" ]; then
+ if echo $settings_hash | grep -q -v "$command:$hash"; then
+ settings_hash="$settings_hash-$command:$hash"
+ if [ "$command" != "cron" ] && [ "$SILENT" != "yes" ]; then
echo "Processing $drupal..."
fi
- if [ "$1" == "update" ] || [ "$1" == "cron-update" ]; then
+ if [ "$command" == "update" ] || [ "$command" == "cron-update" ]; then
shift
- drupal_update $1 $drupal $*
+ drupal_update $command $drupal $*
else
drush -l $drupal $*
fi