projects
/
drupal-init-tools.git
/ blobdiff
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
debian: initial import for the debian package
[drupal-init-tools.git]
/
libexec
/
new.sh
diff --git
a/libexec/new.sh
b/libexec/new.sh
index
385c141
..
bc88c00
100755
(executable)
--- a/
libexec/new.sh
+++ b/
libexec/new.sh
@@
-20,7
+20,7
@@
set -e
usage() {
cat <<EOF
usage() {
cat <<EOF
-usage: drin $(basename
$0
.sh) [-h|--help] <destdir>
+usage: drin $(basename
"$0"
.sh) [-h|--help] <destdir>
Create a new Drupal project in the 'destdir' directory.
Create a new Drupal project in the 'destdir' directory.
@@
-64,14
+64,9
@@
pushd "$DESTDIR"
git remote rename origin upstream
git checkout -b master
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 <<EOF
{
cat > composer.patches.json <<EOF
{
@@
-114,13
+109,18
@@
cat > bootstrap.conf <<EOF
#MYSQL_ROOT_PASSWORD="password"
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."
# Add some basic access control to protect sensitive files like bootstrap.conf
cat > .htaccess <<EOF
Options -Indexes
echo
echo "Uncomment and customize the values in the bootstrap.conf file."
# Add some basic access control to protect sensitive files like bootstrap.conf
cat > .htaccess <<EOF
Options -Indexes
-SetEnvIf Request_URI "/web
/.*
" access_granted
+SetEnvIf Request_URI "/web
(/.*)?$
" access_granted
Order allow,deny
Allow from env=access_granted
EOF
Order allow,deny
Allow from env=access_granted
EOF