summaryrefslogtreecommitdiffstats
path: root/assets/bin
diff options
context:
space:
mode:
authormakefu <github@syntax-fehler.de>2011-12-09 19:08:17 +0100
committermakefu <github@syntax-fehler.de>2011-12-09 19:08:17 +0100
commit0b170bf925406581fef9d31ae548439cec40acca (patch)
tree5bf5e75cf4503ac02de89e9124513383edd8a884 /assets/bin
parent463a8e4f14dcc1da7aecb48ac4b012f08017fea7 (diff)
//assets/bin/asq: using env with more magic and sparkles
everything ASS_* variable will be used after a project is created if these vars are set
Diffstat (limited to 'assets/bin')
-rwxr-xr-xassets/bin/asq11
1 files changed, 5 insertions, 6 deletions
diff --git a/assets/bin/asq b/assets/bin/asq
index 732a296a..f212d0de 100755
--- a/assets/bin/asq
+++ b/assets/bin/asq
@@ -4,12 +4,11 @@ cd $(dirname $(readlink -f $0))
if [ "$1" == "c" ];then
echo ./ass create "$2" && export ASS_CREATED="$2"
- if [ "${ASS_OWNER-}" ]; then
- $0 s "owner" "${ASS_OWNER}"
- fi
- if [ "${ASS_LOCATION-}" ]; then
- $0 s "location" "${ASS_LOCATION}"
- fi
+ 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
echo ./ass set "${ASS_CREATED}" "${2}" "${3}"