projects
/
drupal-init-tools.git
/ commitdiff
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
9725959
)
Fix double quoting, suggested by shellcheck
author
Antonio Ospite <ao2@ao2.it>
Mon, 18 Dec 2017 14:54:11 +0000
(15:54 +0100)
committer
Antonio Ospite <ao2@ao2.it>
Mon, 18 Dec 2017 14:56:22 +0000
(15:56 +0100)
drin.in
patch
|
blob
|
history
libexec/bootstrap.sh
patch
|
blob
|
history
libexec/clean.sh
patch
|
blob
|
history
libexec/create-profile.sh
patch
|
blob
|
history
libexec/new.sh
patch
|
blob
|
history
diff --git
a/drin.in
b/drin.in
index
4ba7583
..
b3abfae
100644
(file)
--- a/
drin.in
+++ b/
drin.in
@@
-18,7
+18,7
@@
set -e
set -e
-PROGNAME=$(basename
$0
)
+PROGNAME=$(basename
"$0"
)
LIBEXEC="@libexec@"
usage() {
LIBEXEC="@libexec@"
usage() {
@@
-35,7
+35,7
@@
EOF
for subcommand in ${LIBEXEC}/*.sh;
do
for subcommand in ${LIBEXEC}/*.sh;
do
- echo " $(basename
$subcommand
.sh)"
+ echo " $(basename
"$subcommand"
.sh)"
done
}
done
}
@@
-59,7
+59,7
@@
do
exit 1
else
shift
exit 1
else
shift
- exec
$subcommand
"$@"
+ exec
"$subcommand"
"$@"
fi
;;
esac
fi
;;
esac
diff --git
a/libexec/bootstrap.sh
b/libexec/bootstrap.sh
index
f48e303
..
42911cb
100755
(executable)
--- a/
libexec/bootstrap.sh
+++ b/
libexec/bootstrap.sh
@@
-20,7
+20,7
@@
set -e
usage() {
cat <<EOF
usage() {
cat <<EOF
-usage: drin $(basename
$0
.sh) [--devel|-h|--help]
+usage: drin $(basename
"$0"
.sh) [--devel|-h|--help]
Bootstrap a Drupal project, using settings from a 'bootstrap.conf' file.
Bootstrap a Drupal project, using settings from a 'bootstrap.conf' file.
@@
-94,15
+94,15
@@
DRUPAL_CONSOLE="${PWD}/vendor/bin/drupal"
# This becomes unnecessary if the installation profile gets pulled in by
# composer.json, like suggested in
# https://github.com/drupal-composer/drupal-project/issues/249
# This becomes unnecessary if the installation profile gets pulled in by
# composer.json, like suggested in
# https://github.com/drupal-composer/drupal-project/issues/249
-if ! echo
$INSTALLATION_PROFILE
| egrep -q "^(minimal|standard)$";
+if ! echo
"$INSTALLATION_PROFILE"
| egrep -q "^(minimal|standard)$";
then
then
- if [ -d
$SITE_LOCAL_PATH/profiles/$INSTALLATION_PROFILE
-a "$OVERWRITE_PROFILE" != "true" ];
+ if [ -d
"${SITE_LOCAL_PATH}/profiles/${INSTALLATION_PROFILE}"
-a "$OVERWRITE_PROFILE" != "true" ];
then
echo "Installation profile '$INSTALLATION_PROFILE' already there." 1>&2
echo "Use --overwrite-profile to copy over it." 1>&2
exit 1
else
then
echo "Installation profile '$INSTALLATION_PROFILE' already there." 1>&2
echo "Use --overwrite-profile to copy over it." 1>&2
exit 1
else
- cp -a
$INSTALLATION_PROFILE $SITE_LOCAL_PATH/profiles
+ cp -a
"$INSTALLATION_PROFILE" "${SITE_LOCAL_PATH}/profiles"
fi
fi
fi
fi
diff --git
a/libexec/clean.sh
b/libexec/clean.sh
index
34ef55e
..
daa86fb
100755
(executable)
--- a/
libexec/clean.sh
+++ b/
libexec/clean.sh
@@
-20,7
+20,7
@@
set -e
usage() {
cat <<EOF
usage() {
cat <<EOF
-usage: drin $(basename
$0
.sh) [-h|--help]
+usage: drin $(basename
"$0"
.sh) [-h|--help]
Cleanup the project, removing all the installed files.
Cleanup the project, removing all the installed files.
@@
-51,8
+51,8
@@
echo
read -p "Type ${CONFIRMATION_STRING} to confirm: " INPUT
run() {
read -p "Type ${CONFIRMATION_STRING} to confirm: " INPUT
run() {
- echo
$*
- $*
+ echo
"$@"
+ "$@"
}
[ "$INPUT" = "$CONFIRMATION_STRING" ] && run sudo rm -rf config/ web/ vendor/ composer.lock
}
[ "$INPUT" = "$CONFIRMATION_STRING" ] && run sudo rm -rf config/ web/ vendor/ composer.lock
diff --git
a/libexec/create-profile.sh
b/libexec/create-profile.sh
index
5fe572a
..
4ccdc9b
100755
(executable)
--- a/
libexec/create-profile.sh
+++ b/
libexec/create-profile.sh
@@
-20,7
+20,7
@@
set -e
usage() {
cat <<EOF
usage() {
cat <<EOF
-usage: drin $(basename
$0
.sh) [-h|--help] <title> <machine_name>
+usage: drin $(basename
"$0"
.sh) [-h|--help] <title> <machine_name>
Create an installation profile from the installed project.
Create an installation profile from the installed project.
@@
-88,8
+88,8
@@
$DRUPAL_CONSOLE generate:profile \
--profile="$PROFILE_TITLE" \
--machine-name="$PROFILE_MACHINE_NAME" \
--description="Drupal installation profile for $PROFILE_TITLE" \
--profile="$PROFILE_TITLE" \
--machine-name="$PROFILE_MACHINE_NAME" \
--description="Drupal installation profile for $PROFILE_TITLE" \
- --dependencies=
$ENABLED_MODULES
\
- --themes=
$ENABLED_THEMES
\
+ --dependencies=
"$ENABLED_MODULES"
\
+ --themes=
"$ENABLED_THEMES"
\
--profile-path="$PROJECT_ROOT" \
--no-interaction
--profile-path="$PROJECT_ROOT" \
--no-interaction
@@
-107,7
+107,7
@@
find "${PROJECT_ROOT}/${PROFILE_MACHINE_NAME}/config/install" -type f -exec sed
#fdupes -f -1 "${WEB_ROOT}/core/profiles/standard/config/install/" "${PROJECT_ROOT}/${PROFILE_MACHINE_NAME}/config/install/" | xargs rm
# Export the default content if the default_content module is there
#fdupes -f -1 "${WEB_ROOT}/core/profiles/standard/config/install/" "${PROJECT_ROOT}/${PROFILE_MACHINE_NAME}/config/install/" | xargs rm
# Export the default content if the default_content module is there
-if echo
$ENABLED_MODULES
| grep -q default_content;
+if echo
"$ENABLED_MODULES"
| grep -q default_content;
then
$DRUSH default-content-export-references --folder="${PROJECT_ROOT}/${PROFILE_MACHINE_NAME}/content" node
fi
then
$DRUSH default-content-export-references --folder="${PROJECT_ROOT}/${PROFILE_MACHINE_NAME}/content" node
fi
diff --git
a/libexec/new.sh
b/libexec/new.sh
index
a73b894
..
2064c89
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.