github.com/hooklift/nomad@v0.5.7-0.20170407200202-db11e7dd7b55/scripts/install_rkt.sh (about) 1 #!/bin/bash 2 3 set -e 4 5 RKT_VERSION="v1.18.0" 6 CMD="cp" 7 8 if [ ! -v DEST_DIR ]; then 9 DEST_DIR="/usr/local/bin" 10 CMD="sudo cp" 11 fi 12 13 if [[ $(which rkt >/dev/null && rkt version | head -n 1) == "rkt Version: 1.18.0" ]]; then 14 echo "rkt installed; Skipping" 15 else 16 printf "Fetching rkt-%s.tar.gz\n" "${RKT_VERSION}" 17 cd /tmp 18 wget -q https://github.com/coreos/rkt/releases/download/$RKT_VERSION/rkt-$RKT_VERSION.tar.gz -O rkt.tar.gz 19 tar xzf rkt.tar.gz 20 21 $CMD rkt-$RKT_VERSION/rkt $DEST_DIR 22 $CMD rkt-$RKT_VERSION/*.aci $DEST_DIR 23 fi 24 25 rkt version