rm: clean extra

This commit is contained in:
Kuoi 2023-05-08 11:00:13 +08:00 committed by GitHub
parent e5e06ed7d6
commit 8d72927d65
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,32 +0,0 @@
#!/bin/bash
# This script checks if git, curl or wget are available and downloads https://github.com/fsquillace/junest.git to ~/.junest
# Check if git is available
#if command -v git &> /dev/null; then
# Use git to clone the repository
# git clone https://github.com/fsquillace/junest.git ~/.junest
# exit 0
#fi
# Check if curl and zip are available
if command -v curl &> /dev/null && command -v zip &> /dev/null; then
# Use curl to download the repository as a zip file and extract it
curl -L https://github.com/fsquillace/junest/archive/refs/heads/master.zip -o junest.zip
unzip junest.zip -d ~/.junest
rm junest.zip
exit 0
fi
# Check if wget and zip are available
if command -v wget &> /dev/null && command -v zip &> /dev/null; then
# Use wget to download the repository as a zip file and extract it
wget https://github.com/fsquillace/junest/archive/refs/heads/master.zip -O junest.zip
unzip junest.zip -d ~/.junest
rm junest.zip
exit 0
fi
# If none of the commands are available, print an error message and exit with non-zero code
echo "Error: curl/wget or zip are not available on this system."
exit