aboutsummaryrefslogtreecommitdiffstats
path: root/ves.sh
diff options
context:
space:
mode:
Diffstat (limited to 'ves.sh')
-rw-r--r--ves.sh113
1 files changed, 57 insertions, 56 deletions
diff --git a/ves.sh b/ves.sh
index 49ac263..0287a8a 100644
--- a/ves.sh
+++ b/ves.sh
@@ -1,59 +1,60 @@
#!/bin/sh
+ves() {
+ if [ -z "$VES_SCRIPTS_DIR" ]; then
+ VES_BIN="$HOME/.local/bin/ves_scripts"
+ else
+ VES_BIN="$VES_SCRIPTS_DIR"
+ fi
-if [ -z "$VES_SCRIPTS_DIR" ]; then
- VES_BIN="$HOME/.local/bin/ves_scripts"
-else
- VES_BIN="$VES_SCRIPTS_DIR"
-fi
-
-# extract the appropriate command
-case $1 in
- create)
- shift
- $VES_BIN/ves-create.sh $@
- break
- ;;
- delete)
- shift
- $VES_BIN/ves-delete.sh $@
- break
- ;;
- var-add)
- shift
- $VES_BIN/ves-addvar.sh $@
- break
- ;;
- var-rm)
- shift
- $VES_BIN/ves-rmvar.sh $@
- break
- ;;
- export)
- shift
- $VES_BIN/ves-export.sh $@
- break
- ;;
- list)
- shift
- $VES_BIN/ves-list.sh $@
- break
- ;;
- activate)
- shift
- $VES_BIN/ves-activate.sh $@
- break
- ;;
- deactivate)
- shift
- $VES_BIN/ves-deactivate.sh $@
- break
- ;;
- prompt)
- shift
- $VES_BIN/ves-prompt.sh $@
- break
- ;;
- *)
- printf "ERROR: Invalid command [%s]\n" $1 > /dev/stderr
-esac
+ # extract the appropriate command
+ case $1 in
+ create)
+ shift
+ . $VES_BIN/ves-create.sh $@
+ break
+ ;;
+ delete)
+ shift
+ . $VES_BIN/ves-delete.sh $@
+ break
+ ;;
+ var-add)
+ shift
+ . $VES_BIN/ves-addvar.sh $@
+ break
+ ;;
+ var-rm)
+ shift
+ . $VES_BIN/ves-rmvar.sh $@
+ break
+ ;;
+ export)
+ shift
+ . $VES_BIN/ves-export.sh $@
+ break
+ ;;
+ list)
+ shift
+ . $VES_BIN/ves-list.sh $@
+ break
+ ;;
+ activate)
+ shift
+ . $VES_BIN/ves-activate.sh $@
+ break
+ ;;
+ deactivate)
+ shift
+ . $VES_BIN/ves-deactivate.sh $@
+ break
+ ;;
+ prompt)
+ shift
+ . $VES_BIN/ves-prompt.sh $@
+ break
+ ;;
+ *)
+ printf "ERROR: Invalid command [%s]\n" $1 > /dev/stderr
+ esac
+}