dotfiles/bin/new-drupal-module

20 lines
378 B
Bash
Executable file

#!/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
git clone https://github.com/opdavies/drupal-module-template \
--depth=1 \
"${machine_name}"
pushd "${machine_name}"
just rename "${module_name}"
rm -fr .git .github justfile phpcs.xml.dist
popd