aboutsummaryrefslogtreecommitdiffhomepage
path: root/bin
diff options
context:
space:
mode:
authorRalph Amissah <ralph@amissah.com>2012-10-03 00:16:59 -0400
committerRalph Amissah <ralph@amissah.com>2012-10-03 00:16:59 -0400
commitf6bc7d81dee102b438a9118a66a2f2a86382c729 (patch)
tree36fe1d991dbbcb34426bd17afa212086be937994 /bin
parentv4: bin/sisu $0, make possible to run sisu command on/within project dir tree (diff)
v4: bin/sisu $*, hub, make possible to specify dir path for markup files
* bin/sisu4 & bin/sisu3 now syslinks to bin/sisu
Diffstat (limited to 'bin')
-rw-r--r--bin/sisu82
l---------[-rw-r--r--]bin/sisu3170
l---------[-rw-r--r--]bin/sisu4171
3 files changed, 69 insertions, 354 deletions
diff --git a/bin/sisu b/bin/sisu
index f49cf748..f8123e8c 100644
--- a/bin/sisu
+++ b/bin/sisu
@@ -53,19 +53,34 @@ WOK
$VERBOSE=nil
$KCODE='u' if RUBY_VERSION < '1.9'
argv=$*
- SiSU_version_dir=case argv.inspect
- when /"(?:--v3)"/
- check_sisu_stable_ruby_version?
- 'v3'
- when /"(?:--v4)"/
- check_sisu_stable_ruby_version?
- 'v4'
- when /"(?:--dev)"/
- check_sisu_dev_ruby_version?
- 'v4'
+ SiSU_called_from_directory=Dir.pwd
+ if $0 !~/\bsisu[34]$/
+ SiSU_version_dir=case argv.inspect
+ when /"(?:--v3)"/
+ check_sisu_stable_ruby_version?
+ 'v3'
+ when /"(?:--v4)"/
+ check_sisu_stable_ruby_version?
+ 'v4'
+ when /"(?:--dev)"/
+ check_sisu_dev_ruby_version?
+ 'v4'
+ else
+ check_sisu_stable_ruby_version?
+ 'v4'
+ end
else
- check_sisu_stable_ruby_version?
- 'v4'
+ SiSU_version_dir=case $0
+ when /\bsisu3$/
+ check_sisu_stable_ruby_version?
+ 'v3'
+ when /\bsisu4$/
+ check_sisu_stable_ruby_version?
+ 'v4'
+ else
+ check_sisu_stable_ruby_version?
+ 'v4'
+ end
end