Browse Source
beautifying s3- declare of -a and -A types
pull/15/head
anudanan
5 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
9 additions and
9 deletions
-
s3
|
|
@ -37,17 +37,17 @@ mkdir -p "$tcdir/native/bin" 2>/dev/null; |
|
|
|
[ -L "$workdir/profiles" ] || ln -sf "$profdir" "$workdir/profiles" 2>/dev/null; |
|
|
|
|
|
|
|
#set arrays |
|
|
|
array_names=( SHORT_PROTOCOLS SHORT_READERS SHORT_CARD_READERS AVAI_TCLIST MISS_TCLIST SHORT_ADDONS DISABLED_MODULES SHORT_MODULENAMES ALL_MODULES_LONG INTERNAL_MODULES ENABLED_MODULES INST_TCLIST SSH_CONF_CONTENT USE_vars USE_vars_disable s3cfg_vars ) |
|
|
|
array_names_a=( SHORT_PROTOCOLS SHORT_READERS SHORT_CARD_READERS AVAI_TCLIST MISS_TCLIST SHORT_ADDONS DISABLED_MODULES SHORT_MODULENAMES ALL_MODULES_LONG ENABLED_MODULES INST_TCLIST SSH_CONF_CONTENT ) |
|
|
|
array_names_A=( INTERNAL_MODULES USE_vars USE_vars_disable s3cfg_vars ) |
|
|
|
|
|
|
|
for a_n in "${array_names[@]}"; do |
|
|
|
for a_n in "${array_names_a[@]}"; do |
|
|
|
unset $a_n; |
|
|
|
if [ "$a_n" == "INTERNAL_MODULES" ] || [ "$a_n" == "USE_vars" ] || |
|
|
|
[ "$a_n" == "USE_vars_disable" ] || [ "$a_n" == "s3cfg_vars" ]; |
|
|
|
then |
|
|
|
declare -A $a_n; |
|
|
|
else |
|
|
|
declare -a $a_n; |
|
|
|
fi; |
|
|
|
done |
|
|
|
|
|
|
|
for a_n in "${array_names_A[@]}"; do |
|
|
|
unset $a_n; |
|
|
|
declare -A $a_n; |
|
|
|
done |
|
|
|
|
|
|
|
USE_vars[USE_TARGZ]=; |
|
|
|