X-Git-Url: https://git.ao2.it/drupal-init-tools.git/blobdiff_plain/50b546739d6ba90d12b21700dcd02cebc07f0b7f..cd743defc40ca012b819aac0d40feeffefdc79db:/libexec/create-profile.sh diff --git a/libexec/create-profile.sh b/libexec/create-profile.sh index 4ccdc9b..aa627b0 100755 --- a/libexec/create-profile.sh +++ b/libexec/create-profile.sh @@ -47,7 +47,7 @@ do done -[ "x$1" = "x" -o "x$2" = "x" ] && { usage 1>&2; exit 1; } +{ [ "x$1" = "x" ] || [ "x$2" = "x" ]; } && { usage 1>&2; exit 1; } PROFILE_TITLE="$1" PROFILE_MACHINE_NAME="$2" @@ -81,8 +81,8 @@ pushd "$WEB_ROOT" # However getting them before exporting the configuration and generating the # profile is cleaner. # -ENABLED_MODULES="$($DRUSH pm-list --type=module --status=enabled --pipe | tr '\n' ',')" -ENABLED_THEMES="$($DRUSH pm-list --type=theme --status=enabled --pipe | tr '\n' ',')" +ENABLED_MODULES="$($DRUSH pm-list --type=module --field=name --status=enabled --pipe | tr '\n' ',' | sed 's/,$//')" +ENABLED_THEMES="$($DRUSH pm-list --type=theme --field=name --status=enabled --pipe | tr '\n' ',' | sed 's/,$//')" $DRUPAL_CONSOLE generate:profile \ --profile="$PROFILE_TITLE" \