Do not run zip command when test flag is set

This commit is contained in:
Clemens Schwaighofer
2023-03-23 13:52:32 +09:00
parent c58b0ea7a4
commit a0e7347033

View File

@@ -282,12 +282,21 @@ if [ ${INFO} -eq 1 ]; then
exit;
fi;
# zip everything and remove data in ssh key folder, delete output file with passwords
zip -r \
if [ ${TEST} -eq 0 ]; then
zip -r \
"${root_folder}${output_zip_folder}${output_zip}" \
"${input_file}" \
"${output_file}" \
"${ssh_keygen_folder}" \
-x\*.gitignore;
else
echo "zip -r \\"
echo "${root_folder}${output_zip_folder}${output_zip} \\"
echo "${input_file} \\"
echo "${output_file} \\"
echo "${ssh_keygen_folder} \\"
echo "-x\*.gitignore;"
fi;
echo "Download: ${root_folder}${output_zip_folder}${output_zip}";
# cleam up user log file and ssh keys
if [ ${TEST} -eq 0 ]; then