зеркало из https://github.com/docker/kitematic.git
28 строки
1.1 KiB
Bash
Executable File
28 строки
1.1 KiB
Bash
Executable File
#!/bin/bash
|
|
BASE="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
|
BOOT2DOCKER_CLI_VERSION=$(node -pe "JSON.parse(process.argv[1])['boot2docker-version']" "$(cat $BASE/package.json)")
|
|
BOOT2DOCKER_CLI_FILE=boot2docker-$BOOT2DOCKER_CLI_VERSION
|
|
DOCKER_CLI_VERSION=$(node -pe "JSON.parse(process.argv[1])['docker-version']" "$(cat $BASE/package.json)")
|
|
DOCKER_CLI_FILE=docker-$DOCKER_CLI_VERSION
|
|
|
|
pushd $BASE/resources > /dev/null
|
|
|
|
if [ ! -f $BOOT2DOCKER_CLI_FILE ]; then
|
|
echo "-----> Downloading Boot2docker CLI..."
|
|
rm -rf boot2docker-*
|
|
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
|
|
chmod +x $BOOT2DOCKER_CLI_FILE
|
|
fi
|
|
|
|
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
|
|
|
|
popd > /dev/null
|