Last active
July 16, 2022 08:41
-
-
Save alanhe421/6a299b815f4dd3d242abc16b8be6b861 to your computer and use it in GitHub Desktop.
install-package-lrzsz.sh / shell
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# sudo sh -c "$(curl -fsSL https://gist.githubusercontent.com/alanhg/6a299b815f4dd3d242abc16b8be6b861/raw/dbe1497208f1d968ed8b67cad09c596e35c5be9c/install-package-lrzsz.sh)" | |
YUM_CMD=$(which yum) | |
APT_GET_CMD=$(which apt-get) | |
APT_CMD=$(which apt) | |
PACKAGE=lrzsz | |
if [ ! -z $YUM_CMD ]; then | |
yum install -y $PACKAGE | |
elif [ ! -z $APT_GET_CMD ]; then | |
apt-get install -y $PACKAGE | |
elif [ ! -z $APT_CMD ]; then | |
apt install -y $PACKAGE | |
else | |
echo "error can't install package $PACKAGE" | |
exit 1; | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment