Guard running of the find command

This commit is contained in:
Greg Hellings
2024-07-22 10:21:32 -05:00
parent 29a3ec05d3
commit 7561d51f26
+3 -1
View File
@@ -12,7 +12,9 @@ writeShellApplication {
];
text = ''
shopt -s globstar
find "''${PACKER_CONFIG_DIR}" -name '*_linux_amd64' -exec chmod +x '{}' ";"
if [ -e "''${PACKER_CONFIG_DIR}" ]; then
find "''${PACKER_CONFIG_DIR}" -name '*_linux_amd64' -exec chmod +x '{}' ";"
fi
packer init sources
for vars in distros/**/*.pkrvars.hcl; do
packer validate -except=upload "-var-file=''${vars}" sources/