add auto install for unzip
This commit is contained in:
7
setup.sh
7
setup.sh
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user