dotfiles/bin/new-drupal-module

20 lines
378 B
Plaintext
Raw Permalink Normal View History

#!/usr/bin/env bash
if [[ "$1" == "" || "$2" == "" ]]; then
echo "Usage: ${0##*/} <machine-name> <module-name>"; exit 2
fi
set -euo pipefail
machine_name=$1
module_name=$2
2023-07-09 15:34:53 +00:00
git clone https://github.com/opdavies/drupal-module-template \
--depth=1 \
"${machine_name}"
pushd "${machine_name}"
just rename "${module_name}"
2023-07-09 15:34:53 +00:00
rm -fr .git .github justfile phpcs.xml.dist
popd