add auto install for unzip

This commit is contained in:
2025-12-03 14:52:25 +00:00
parent a92bd509ea
commit 30a80fb986

View File

@@ -24,6 +24,13 @@ if [ -z "$INSTALL_GITEA" ] || [[ "$INSTALL_GITEA" != "y" && "$INSTALL_GITEA" !=
exit 0
elif [[ "$LOCAL_PATH" == *.zip ]]; then
# check if unzip is installed
if ! command -v unzip &> /dev/null; then
echo "unzip could not be found, installing it ..."
sudo apt-get update
sudo apt-get install unzip -y
fi
echo "Extracting compressed file ..."
sudo unzip "$LOCAL_PATH" -d .
exit 0