aboutsummaryrefslogtreecommitdiff
path: root/templater
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2017-11-17 13:13:43 -0200
committerSilvio Rhatto <rhatto@riseup.net>2017-11-17 13:13:43 -0200
commita6383c697ffa68ef0ecd4a0599db524ccdb9dda3 (patch)
tree671733f81d8bb07be24a5eb2eba4bd8a7a63d3ad /templater
parent02bb76c19acc6eadc9634b1ee59f5407825d4b2c (diff)
downloadtemplater-a6383c697ffa68ef0ecd4a0599db524ccdb9dda3.tar.gz
templater-a6383c697ffa68ef0ecd4a0599db524ccdb9dda3.tar.bz2
Adds diff option
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