Skip to content

Instantly share code, notes, and snippets.

@mattfoster
Created October 16, 2019 14:17
Show Gist options
  • Save mattfoster/d13aeeb6886e3d5d15d85ed2dad5a13b to your computer and use it in GitHub Desktop.
Save mattfoster/d13aeeb6886e3d5d15d85ed2dad5a13b to your computer and use it in GitHub Desktop.
#! /bin/sh
if [[ -x $(which apt 2>&1) ]]; then
exec apt install -y $@
elif [[ -x $(which apk 2>&1) ]]; then
exec apk add $@
elif [[ -x $(which dnf 2>&1) ]]; then
exec dnf install -y $@
elif [[ -x $(which yum 2>&1) ]]; then
exec yum install -y $@
elif [[ -x $(which brew 2>&1) ]]; then
exec brew install $@
elif [[ -x $(which pacman 2>&1) ]]; then
exec pacman -S $@
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment