fix: added testing for zip command

This commit is contained in:
v4n
2025-01-15 18:29:19 +02:00
parent d32a4f49c0
commit 087dd4561c
+6 -1
View File
@@ -412,7 +412,12 @@ function mod_export() {
exit 0 exit 0
fi fi
echo -ne "Zip file will be saved in the ${RED}current directory${NC}. Continue? (Y/n): " if ! command -v zip &> /dev/null; then
echo -e "${RED}Error${NC}: zip is not installed, please install the package and try again." >&2
exit 1
fi
echo -ne "Zip file will be saved in the current directory ($(pwd)). Continue? (Y/n): "
read -r confirm read -r confirm
if [[ "$confirm" == "y" || "$confirm" == "Y" || "$confirm" = "" ]]; then if [[ "$confirm" == "y" || "$confirm" == "Y" || "$confirm" = "" ]]; then
OUT_DIR=$(mktemp -d) OUT_DIR=$(mktemp -d)