Skip to content

Instantly share code, notes, and snippets.

@spudtrooper
Created May 30, 2011 12:13
Show Gist options
  • Select an option

  • Save spudtrooper/998819 to your computer and use it in GitHub Desktop.

Select an option

Save spudtrooper/998819 to your computer and use it in GitHub Desktop.
Tries to install something using fink, macports, and apt-get.
#!/bin/sh
#
# Tries to install something using fink, macports, and apt-get.
#
cmds="fink port apt-get"
for c in $cmds; do
test x`which $c` != 'x' && {
$c install $@
test "$?" -eq "0" && exit 1
}
done
echo "Could not install $@"
exit 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment