X-Git-Url: https://git.ao2.it/drupal-init-tools.git/blobdiff_plain/cce156e037cf0e04db479c4eea768c0a933ae4b2..0ffd9f77472a04d5c7166e06d8148e178888592f:/libexec/new.sh diff --git a/libexec/new.sh b/libexec/new.sh index 012c3cb..a54abdd 100755 --- a/libexec/new.sh +++ b/libexec/new.sh @@ -20,7 +20,7 @@ set -e usage() { cat < +usage: drin $(basename "$0" .sh) [-h|--help] Create a new Drupal project in the 'destdir' directory. @@ -60,18 +60,13 @@ command -v git &> /dev/null || { echo "Aborting, 'git' not available." 1>&2; exi echo "Creating a new Drupal project..." composer create-project drupal-composer/drupal-project:8.x-dev@dev "$DESTDIR" --keep-vcs --stability dev --no-interaction -pushd "$DESTDIR" +pushd "$DESTDIR" > /dev/null git remote rename origin upstream git checkout -b master -echo >> .gitignore -echo "# Ignore the configuration for the bootstrap script" >> .gitignore -echo "bootstrap.conf" >> .gitignore -# Add some patches, use sed until composer can do that from the command line -# (e.g. composer config ...) -sed -i -e 's@"extra": {@"extra": {\ - "patches-file": "composer.patches.json",@' composer.json +# Add some patches +composer config extra.patches-file "composer.patches.json" cat > composer.patches.json < bootstrap.conf <> .gitignore < .htaccess < /dev/null