Browse Source

change array declare

pull/15/head
Gorgone 5 years ago
committed by GitHub
parent
commit
4539cf8041
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 11
      s3

11
s3

@ -39,7 +39,16 @@ mkdir -p "$tcdir/native/bin" 2>/dev/null;
#set arrays #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=( 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 )
for a_n in "${array_names[@]}";do unset $a_n; declare -a $a_n; done for a_n in "${array_names[@]}"; 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
USE_vars[USE_TARGZ]=; USE_vars[USE_TARGZ]=;
USE_vars[USE_PATCH]=; USE_vars[USE_PATCH]=;

Loading…
Cancel
Save