2016-02-05 21:48:27 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
set -ex
|
|
|
|
|
2016-10-18 23:58:25 +00:00
|
|
|
RKT_VERSION="v1.17.0"
|
|
|
|
RKT_SHA512="30fd15716e148afa34ed28e6d5d778226e5e9761e9df3eb98f397cb2a7f3e3fc78e3dad2b717eee4157afc58183778cb1872aa82f3d05cc2bc9fb41193e81a7f"
|
|
|
|
CMD="cp"
|
2016-02-05 21:48:27 +00:00
|
|
|
|
2016-10-18 23:58:25 +00:00
|
|
|
if [ ! -v DEST_DIR ]; then
|
|
|
|
DEST_DIR="/usr/local/bin"
|
|
|
|
CMD="sudo cp"
|
|
|
|
fi
|
2016-02-17 02:57:12 +00:00
|
|
|
|
2016-05-07 17:14:36 +00:00
|
|
|
if [ ! -d "rkt-${RKT_VERSION}" ]; then
|
|
|
|
printf "rkt-%s/ doesn't exist\n" "${RKT_VERSION}"
|
|
|
|
if [ ! -f "rkt-${RKT_VERSION}.tar.gz" ]; then
|
|
|
|
printf "Fetching rkt-%s.tar.gz\n" "${RKT_VERSION}"
|
2016-10-18 23:58:25 +00:00
|
|
|
echo "$RKT_SHA512 rkt-${RKT_VERSION}.tar.gz" > rkt-$RKT_VERSION.tar.gz.sha512sum
|
2016-05-07 17:14:36 +00:00
|
|
|
wget https://github.com/coreos/rkt/releases/download/$RKT_VERSION/rkt-$RKT_VERSION.tar.gz
|
2016-10-18 23:58:25 +00:00
|
|
|
sha512sum --check rkt-$RKT_VERSION.tar.gz.sha512sum
|
2016-05-07 17:14:36 +00:00
|
|
|
tar xzvf rkt-$RKT_VERSION.tar.gz
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
2016-10-18 23:58:25 +00:00
|
|
|
$CMD rkt-$RKT_VERSION/rkt $DEST_DIR
|
|
|
|
$CMD rkt-$RKT_VERSION/*.aci $DEST_DIR
|
2016-02-05 23:08:33 +00:00
|
|
|
|
|
|
|
rkt version
|