diff options
author | Silvio Rhatto <rhatto@riseup.net> | 2017-11-17 11:34:31 -0200 |
---|---|---|
committer | Silvio Rhatto <rhatto@riseup.net> | 2017-11-17 11:34:31 -0200 |
commit | ca223571c8548fda2e6571daf497482d8d236362 (patch) | |
tree | 86daa0f8eba8222b7d5ff85c0b4e101795b7c450 /share/templater/templater | |
parent | f6851134c07c74554437db5be4abb13cafafc1b6 (diff) | |
download | templater-ca223571c8548fda2e6571daf497482d8d236362.tar.gz templater-ca223571c8548fda2e6571daf497482d8d236362.tar.bz2 |
Rename __templater_ functions to templater_
Diffstat (limited to 'share/templater/templater')
-rw-r--r-- | share/templater/templater/functions | 18 | ||||
-rwxr-xr-x | share/templater/templater/setup | 4 |
2 files changed, 11 insertions, 11 deletions
diff --git a/share/templater/templater/functions b/share/templater/templater/functions index 47c240b..b8658d2 100644 --- a/share/templater/templater/functions +++ b/share/templater/templater/functions @@ -4,15 +4,15 @@ # # Initialize project -function __templater_init { +function templater_init { if [ ! -d "$PROJECT" ]; then - __templater_echo "Initializing $PROJECT..." + templater_echo "Initializing $PROJECT..." mkdir -p $PROJECT fi } # Read a parameter from user -function __templater_ask { +function templater_ask { local input local function="$1" local default="n" @@ -26,27 +26,27 @@ function __templater_ask { } # Return list of implementations -function __templater_implementations { +function templater_implementations { # Do not sort this list: the order in which functions are present in the code is important #grep "^function templater_" $PROGRAM | cut -d ' ' -f 2 | sed -e 's/templater_//' ls $SHARE } # Message -function __templater_echo { +function templater_echo { #echo "" echo "-> $*" } # Checkout to develop branch if available -function __templater_checkout_develop { +function templater_checkout_develop { if git branch --list develop | grep -q develop; then git checkout develop fi } # Copy or append source file into destination -function __templater_copy_or_append { +function templater_copy_or_append { local implementation="$1" local file="$2" @@ -62,7 +62,7 @@ function __templater_copy_or_append { } # Read a parameter from user -function __templater_user_input { +function templater_user_input { local input local param="$1" local default="$2" @@ -82,7 +82,7 @@ function __templater_user_input { } # Install the global Makefile -function __templater_install_makefile { +function templater_install_makefile { if [ -z "$1" ]; then return fi diff --git a/share/templater/templater/setup b/share/templater/templater/setup index fd26e5c..14050e3 100755 --- a/share/templater/templater/setup +++ b/share/templater/templater/setup @@ -12,13 +12,13 @@ source $SHARE/templater/functions || exit 1 # Templater module function templater_templater { if [ ! -e "description" ]; then - __templater_echo "Setting Templater Module" + templater_echo "Setting Templater Module" touch setup description chmod +x setup mkdir files else - __templater_echo "Templater Module already set" + templater_echo "Templater Module already set" fi } |