Skip to content

Instantly share code, notes, and snippets.

@alanhg
Last active July 16, 2022 08:41
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save alanhg/6a299b815f4dd3d242abc16b8be6b861 to your computer and use it in GitHub Desktop.
Save alanhg/6a299b815f4dd3d242abc16b8be6b861 to your computer and use it in GitHub Desktop.
install-package-lrzsz.sh / shell
#!/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