2016-02-05 21:48:27 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
set -ex
|
|
|
|
|
2017-01-27 19:52:09 +00:00
|
|
|
RKT_VERSION="v1.18.0"
|
2016-10-18 23:58:25 +00:00
|
|
|
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}"
|
|
|
|
wget https://github.com/coreos/rkt/releases/download/$RKT_VERSION/rkt-$RKT_VERSION.tar.gz
|
|
|
|
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
|