aboutsummaryrefslogtreecommitdiff
path: root/templater
diff options
context:
space:
mode:
Diffstat (limited to 'templater')
-rwxr-xr-xtemplater19
1 files changed, 15 insertions, 4 deletions
diff --git a/templater b/templater
index ad24eb3..06ae288 100755
--- a/templater
+++ b/templater
@@ -65,16 +65,27 @@ templater_init
# Go to project folder
cd $PROJECT &> /dev/null
-# Setup modules
+# Process modules
if [ -z "$MODULES" ]; then
for project in `templater_implementations`; do
templater_ask $project
done
else
for module in $MODULES; do
- if `templater_implementations | grep -q "^$module"`; then
- #templater_$module
- $SHARE/$module/setup $SHARE
+ # Skip options
+ if echo $module | grep -q '^--'; then
+ continue
+ fi
+
+ #if `templater_implementations | grep -q "^$module"`; then
+ if [ -d "$SHARE/$module" ]; then
+ # Dispatch
+ if echo $* | grep -q -- '--diff'; then
+ templater_diff $module
+ #elif echo $* | grep -q -- '--update'; then
+ else
+ $SHARE/$module/setup $SHARE
+ fi
else
templater_echo "No such module $module, skipping"
fi