github.com/keltia/go-ipfs@v0.3.8-0.20150909044612-210793031c63/cmd/ipfs/dist/install.sh (about)

     1  #!/bin/sh
     2  
     3  bin=ipfs
     4  
     5  # this script is currently brain dead.
     6  # it merely tries two locations.
     7  # in the future maybe use value of $PATH.
     8  
     9  binpath=/usr/local/bin
    10  if [ -d "$binpath" ]; then
    11    mv "$bin" "$binpath/$bin"
    12    echo "installed $binpath/$bin"
    13    exit 0
    14  fi
    15  
    16  binpath=/usr/bin
    17  if [ -d "$binpath" ]; then
    18    mv "$bin" "$binpath/$bin"
    19    echo "installed $binpath/$bin"
    20    exit 0
    21  fi