I have the following script that throws a Bad substitution error. I think it's due to this: ${IMPORTS[*]}
The research I've done online suggests to me this sort of error can be cause if the script is run by "sh" instead of "bash"
How does packer execute the script? The script is run by root (ssh_username), and the script is run on a debian wheezy box.
Are there any workarounds?
----
#!/bin/bash
IMPORTS=$(find /var/log -type f -name *.log.*)
for item in ${IMPORTS[*]};
do
IMPORT="$(dirname $item)/"
# perform the import
echo $IMPORT
done