aboutsummaryrefslogtreecommitdiff
path: root/share/templater/templater/functions
diff options
context:
space:
mode:
Diffstat (limited to 'share/templater/templater/functions')
-rw-r--r--share/templater/templater/functions23
1 files changed, 23 insertions, 0 deletions
diff --git a/share/templater/templater/functions b/share/templater/templater/functions
index af6be08..47c240b 100644
--- a/share/templater/templater/functions
+++ b/share/templater/templater/functions
@@ -81,3 +81,26 @@ function __templater_user_input {
fi
}
+# Install the global Makefile
+function __templater_install_makefile {
+ if [ -z "$1" ]; then
+ return
+ fi
+
+ local src="$1"
+ local name="`basename $src`"
+
+ # First ensure we have the main Makefile
+ if [ ! -e "Makefile" ]; then
+ cp $SHARE/templater/files/Makefile .
+ fi
+
+ # Then copy the custom Makefile
+ if [ ! -e "$name" ]; then
+ cp $src .
+ fi
+
+ #if ! grep -q "^Makefile.local" .gitignore; then
+ # echo Makefile.local >> .gitignore
+ #fi
+}