diff options
-rw-r--r-- | assets/README | 15 | ||||
-rwxr-xr-x | assets/bin/asq | 22 | ||||
-rwxr-xr-x | assets/bin/fast | 20 |
3 files changed, 31 insertions, 26 deletions
diff --git a/assets/README b/assets/README index f1875194..7f90bfbf 100644 --- a/assets/README +++ b/assets/README @@ -21,17 +21,20 @@ Example: ass set bob-pc owner bob ass set bob-pc location bob\'s-home -### asq (ass-quick) -asq is a wrapper around the core ass. It should be used for adding lots and lots of new entries to the truth. It evaluates Variables from your environment. +### asq +asq is a tool to query the truth for facts. This is currently only a placeholder + +### FAST +fast is a wrapper around the core ass. It should be used for adding lots and lots of new entries to the truth. It evaluates Variables from your environment. Example: export ASS_LOCATION=bob\'s-home export ASS_OWNER=bob - asq c logitech-sidewinder-gamepad - asq c arduino-uno - asq s amount 3 + fast c logitech-sidewinder-gamepad + fast c arduino-uno + fast s amount 3 -asq will then actually generate the following: +fast will then actually generate the following: ass create logitech-sidewinder-gamepad ass set logitech-sidewinder-gamepad owner bob ass set logitech-sidewinder-gamepad location bob\'s-home diff --git a/assets/bin/asq b/assets/bin/asq index 41725d0b..0204e05b 100755 --- a/assets/bin/asq +++ b/assets/bin/asq @@ -1,20 +1,2 @@ -#!/bin/bash -set -xeuf -cd $(dirname $(readlink -f $0)) - -if [ "$1" == "c" ];then - ./ass create "$2" && export ASS_CREATED="$2" - for i in `env | grep -v '^ASS_CREATED=' | grep "^ASS" | cut -d '=' -f 1`;do - e=`echo $i | cut -d '_' -f 2 | tr '[A-Z]' '[a-z]'` - eval con=\$$i - $0 s "$e" "$con" - done -else if [ "$1" == "s" ] -then - ./ass set "${ASS_CREATED}" "${2}" "${3}" - else - echo "you are made of stupid!" - cat $0 - exit 23 - fi -fi +#!/bin/something +# placeholder to asq the truth for facts diff --git a/assets/bin/fast b/assets/bin/fast new file mode 100755 index 00000000..41725d0b --- /dev/null +++ b/assets/bin/fast @@ -0,0 +1,20 @@ +#!/bin/bash +set -xeuf +cd $(dirname $(readlink -f $0)) + +if [ "$1" == "c" ];then + ./ass create "$2" && export ASS_CREATED="$2" + for i in `env | grep -v '^ASS_CREATED=' | grep "^ASS" | cut -d '=' -f 1`;do + e=`echo $i | cut -d '_' -f 2 | tr '[A-Z]' '[a-z]'` + eval con=\$$i + $0 s "$e" "$con" + done +else if [ "$1" == "s" ] +then + ./ass set "${ASS_CREATED}" "${2}" "${3}" + else + echo "you are made of stupid!" + cat $0 + exit 23 + fi +fi |