From 0b170bf925406581fef9d31ae548439cec40acca Mon Sep 17 00:00:00 2001 From: makefu Date: Fri, 9 Dec 2011 19:08:17 +0100 Subject: //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 --- assets/bin/asq | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'assets') 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}" -- cgit v1.2.3