kitematic/deps

28 строки
1.1 KiB
Plaintext
Исходник Обычный вид История

2015-01-24 00:49:25 +03:00
#!/bin/bash
2015-01-25 21:29:51 +03:00
BASE="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
2015-02-02 08:33:36 +03:00
BOOT2DOCKER_CLI_VERSION=$(node -pe "JSON.parse(process.argv[1])['boot2docker-version']" "$(cat $BASE/package.json)")
BOOT2DOCKER_CLI_FILE=boot2docker-$BOOT2DOCKER_CLI_VERSION
2015-02-12 02:09:17 +03:00
DOCKER_CLI_VERSION=$(node -pe "JSON.parse(process.argv[1])['docker-version']" "$(cat $BASE/package.json)")
DOCKER_CLI_FILE=docker-$DOCKER_CLI_VERSION
2015-01-24 00:49:25 +03:00
pushd $BASE/resources > /dev/null
2015-02-02 08:33:36 +03:00
if [ ! -f $BOOT2DOCKER_CLI_FILE ]; then
2015-01-24 00:49:25 +03:00
echo "-----> Downloading Boot2docker CLI..."
rm -rf boot2docker-*
2015-02-12 02:09:17 +03:00
curl -L -o $BOOT2DOCKER_CLI_FILE https://github.com/boot2docker/boot2docker-cli/releases/download/v$BOOT2DOCKER_CLI_VERSION/boot2docker-v$BOOT2DOCKER_CLI_VERSION-darwin-amd64
2015-02-02 08:33:36 +03:00
chmod +x $BOOT2DOCKER_CLI_FILE
2015-01-24 00:49:25 +03:00
fi
2015-02-12 02:09:17 +03:00
if [ ! -f $DOCKER_CLI_FILE ]; then
echo "-----> Downloading Docker CLI..."
rm -rf docker-*
curl -L -o docker-$DOCKER_CLI_VERSION.tgz https://get.docker.com/builds/Darwin/x86_64/docker-$DOCKER_CLI_VERSION.tgz
tar xvzf docker-$DOCKER_CLI_VERSION.tgz --strip=3
rm docker-$DOCKER_CLI_VERSION.tgz
mv docker docker-$DOCKER_CLI_VERSION
chmod +x $DOCKER_CLI_FILE
fi
2015-01-24 00:49:25 +03:00
popd > /dev/null