Skip to content

Instantly share code, notes, and snippets.

@mattfoster
Created October 16, 2019 14:17
Show Gist options
  • Select an option

  • Save mattfoster/d13aeeb6886e3d5d15d85ed2dad5a13b to your computer and use it in GitHub Desktop.

Select an option

Save mattfoster/d13aeeb6886e3d5d15d85ed2dad5a13b to your computer and use it in GitHub Desktop.

Revisions

  1. mattfoster created this gist Oct 16, 2019.
    15 changes: 15 additions & 0 deletions jfi.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,15 @@
    #! /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