aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xtmp.py13
1 files changed, 7 insertions, 6 deletions
diff --git a/tmp.py b/tmp.py
index 0691ea0..638f064 100755
--- a/tmp.py
+++ b/tmp.py
@@ -58,9 +58,10 @@ URLS_tmp['target_url']='https://mcepl.fedorapeople.org/tmp/'
URLS_tmp['shorten_api']='https://da.gd/s?url='
declare -A URLS
-URLS['barstool']=URLS_barstool[@]
-URLS['wotan']=URLS_wotan[@]
-URLS['tmp']=URLS_tmp[@]
+# b=( "${a[@]}" )
+URLS['barstool']=( "${URLS_barstool[@]}" )
+URLS['wotan']=( "${URLS_wotan[@]" )
+URLS['tmp']=( "${URLS_tmp[@]" )
# Requires GNU sed
CMDNAME="$(echo "$(basename $0)"|sed 's/./\L&/g')"
@@ -68,14 +69,14 @@ declare -A config
echo ${@:1}
-for elem in ${URLS[$CMDNAME]}
+for elem in "${URLS[$CMDNAME]}"
do
# echo "key : ${elem}" -- "value: ${config[${elem}]}"
config[${elem}]=${URLS[$CMDNAME][${elem}]}
done
-echo ${config[@]}
-echo ${!config[@]}
+echo "${config[@]}"
+echo "${!config[@]}"
exit 0