1.下载jfrog文件,运行以下shell脚本
#!/bin/bash
CLI_OS="na"
CLI_UNAME="na"
if $(echo "${OSTYPE}" | grep -q msys); then
CLI_OS="windows"
URL="https://api.bintray.com/content/jfrog/jfrog-cli-go/\$latest/jfrog-cli-windows-amd64/jfrog.exe?bt_package=jfrog-cli-windows-amd64"
FILE_NAME="jfrog.exe"
elif $(echo "${OSTYPE}" | grep -q darwin); then
CLI_OS="mac"
URL="https://api.bintray.com/content/jfrog/jfrog-cli-go/\$latest/jfrog-cli-mac-386/jfrog?bt_package=jfrog-cli-mac-386"
FILE_NAME="jfrog"
else
CLI_OS="linux"
if $(uname -m | grep -q 64); then
CLI_UNAME="64"
URL="https://api.bintray.com/content/jfrog/jfrog-cli-go/\$latest/jfrog-cli-linux-amd64/jfrog?bt_package=jfrog-cli-linux-amd64"
FILE_NAME="jfrog"
else
CLI_UNAME="32"
URL="https://api.bintray.com/content/jfrog/jfrog-cli-go/\$latest/jfrog-cli-linux-386/jfrog?bt_package=jfrog-cli-linux-386"
FILE_NAME="jfrog"
fi
fi
curl -XGET "$URL" -L -k > $FILE_NAME
chmod u+x $FILE_NAME
比如我在/var/fpwork/myname/ 目录下运行该脚本,跑完后会把jfrog 下载下来。(注意看一下当前用户是否有执行权限)
2.add jfrog to PATH
PATH=/var/fpwork/myname/:$PATH
(或者直接:mv jfrog /usr/local/bin)
3.use jfrog
Tobe continue...
链接:https://www.jianshu.com/p/c76bc151ab8b