From fd89cae29180a6a28e6e55b51ce89e70ea3a4984 Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Fri, 27 Oct 2017 19:57:42 -0200 Subject: LICENSE support --- templater | 50 +++++++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 45 insertions(+), 5 deletions(-) (limited to 'templater') diff --git a/templater b/templater index 66413fc..72d4b07 100755 --- a/templater +++ b/templater @@ -346,7 +346,7 @@ function templater_drupal8 { # GPLv3 License function templater_gpl { if [ ! -e "LICENSE" ]; then - __templater_echo "Setting up GPLv3 license..." + __templater_echo "Setting up GPLv3 License..." cp $DIRNAME/share/gpl/LICENSE . else __templater_echo "LICENSE already set" @@ -355,22 +355,62 @@ function templater_gpl { # AGPLv3 License function templater_agpl { - true + if [ ! -e "LICENSE" ]; then + __templater_echo "Setting up Affero GPLv3 License..." + cp $DIRNAME/share/agpl/LICENSE . + else + __templater_echo "LICENSE already set" + fi } # MIT License function templater_mit { - true + if [ ! -e "LICENSE" ]; then + __templater_echo "Setting up MIT License..." + cp $DIRNAME/share/mit/LICENSE . + else + __templater_echo "LICENSE already set" + fi } # Apache License function templater_apache { - true + if [ ! -e "LICENSE" ]; then + __templater_echo "Setting up Apache License..." + cp $DIRNAME/share/apache/LICENSE . + else + __templater_echo "LICENSE already set" + fi } # BSD License function templater_bsd { - true + if [ ! -e "LICENSE" ]; then + __templater_echo "Setting up BSD 3-clause (New BSD) License..." + cp $DIRNAME/share/bsd/LICENSE . + else + __templater_echo "LICENSE already set" + fi +} + +# Mozilla License +function templater_mpl { + if [ ! -e "LICENSE" ]; then + __templater_echo "Setting up Mozilla Public License..." + cp $DIRNAME/share/mpl/LICENSE . + else + __templater_echo "LICENSE already set" + fi +} + +# Do What the Fuck You Want to Public License - WTFPL +function templater_wtfpl { + if [ ! -e "LICENSE" ]; then + __templater_echo "Setting up Do What the Fuck You Want Public License..." + cp $DIRNAME/share/wtfpl/LICENSE . + else + __templater_echo "LICENSE already set" + fi } # Syntax check -- cgit v1.2.3