github.com/vektra/tachyon@v0.0.0-20150921164542-0da4f3861aef/scripts/install.sh (about)

     1  #!/bin/bash
     2  
     3  arch=`uname -m`
     4  
     5  case $arch in
     6    x86_64 )
     7      arch="amd64" ;;
     8    486 | 586 | 686 )
     9      arch="386" ;;
    10    * )
    11      echo "Unsupported arch: $arch"
    12      exit 1
    13      ;;
    14  esac
    15  
    16  os=`uname`
    17  
    18  case $os in
    19    Darwin )
    20      os="darwin"
    21      ;;
    22    Linux )
    23      os="linux"
    24      ;;
    25    * )
    26      echo "Unsupported os: $os"
    27      exit 1
    28  esac
    29  
    30  bin="tachyon-$os-$arch"
    31  
    32  echo "Determined your tachyon binary to be: $bin"
    33  
    34  cur=$(curl -s https://s3-us-west-2.amazonaws.com/tachyon.vektra.io/release)
    35  
    36  if test "$?" != "0"; then
    37    echo "Error computing current release"
    38    exit 1
    39  fi
    40  
    41  echo "Current release is: $cur"
    42  
    43  url="https://s3-us-west-2.amazonaws.com/tachyon.vektra.io/$cur/$bin"
    44  
    45  echo "Downloading $url..."
    46  
    47  curl --compressed -o tachyon $url
    48  
    49  chmod a+x tachyon
    50  
    51  echo ""
    52  echo "Tachyon downloaded to current directory"
    53  echo "We suggest you move it to somewhere in your PATH, like ~/bin"
    54  echo ""
    55  echo "Enjoy!"