diff --git a/get-cli.sh b/get-cli.sh index e43a2369..1c294ce5 100755 --- a/get-cli.sh +++ b/get-cli.sh @@ -1,8 +1,17 @@ -cliVersion=0.1.0 - -curl -L https://github.com/openhie/package-starter-kit/releases/download/$cliVersion/gocli-linux -o ./goinstant-linux -curl -L https://github.com/openhie/package-starter-kit/releases/download/$cliVersion/gocli-macos -o ./goinstant-macos -curl -L https://github.com/openhie/package-starter-kit/releases/download/$cliVersion/gocli.exe -o ./goinstant.exe -chmod +x ./goinstant-linux -chmod +x ./goinstant-macos -chmod +x ./goinstant.exe +#!/bin/bash + +if [ "$1" == "linux" ]; then + curl -L https://github.com/openhie/package-starter-kit/releases/download/latest/gocli-linux -o goinstant + chmod +x goinstant + +elif [ "$1" == "macos" ]; then + curl -L https://github.com/openhie/package-starter-kit/releases/download/latest/gocli-macos -o goinstant + chmod +x goinstant + +elif [ "$1" == "windows" ]; then + curl -L https://github.com/openhie/package-starter-kit/releases/download/latest/gocli.exe -o goinstant.exe + chmod +x ./goinstant.exe + +else + echo 'Usage: ./get-cli.sh "linux|macos|windows"' +fi