new.sh: avoid multiple redirects when creating .gitignore
[drupal-init-tools.git] / libexec / new.sh
index 2064c89..0259f4e 100755 (executable)
@@ -64,9 +64,6 @@ pushd "$DESTDIR"
 
 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 ...)
@@ -114,6 +111,11 @@ cat > bootstrap.conf <<EOF
 #MYSQL_ROOT_PASSWORD="password"
 EOF
 
+cat > .gitignore <<EOF
+# Ignore the configuration for the bootstrap script
+bootstrap.conf
+EOF
+
 echo
 echo "Uncomment and customize the values in the bootstrap.conf file."