File tree Expand file tree Collapse file tree 1 file changed +10
-7
lines changed Expand file tree Collapse file tree 1 file changed +10
-7
lines changed Original file line number Diff line number Diff line change 4
4
# Multi-platform (Linux and macOS)
5
5
# Multi-architecture (amd64, arm64, arm) support
6
6
7
- deps=( curl jq )
7
+ # if curl is not installed then install it
8
+ if ! command -v curl & > /dev/null; then
9
+ echo " curl is not installed. Please install curl and try again."
10
+ exit 1
11
+ fi
8
12
9
- for dep in " ${deps[@]} " ; do
10
- if ! command -v " $dep " & > /dev/null; then
11
- echo " $dep is not installed. Downloading and executing the script..."
12
- curl -sSL https://rollkit.dev/install-jq.sh | bash
13
- fi
14
- done
13
+ # if jq is not installed then install it using the script
14
+ if ! command -v jq & > /dev/null; then
15
+ echo " jq is not installed. Downloading and executing the script..."
16
+ curl -sSL https://rollkit.dev/install-jq.sh | bash
17
+ fi
15
18
16
19
version=" ${1:- $(curl -s ' https://go.dev/dl/?mode=json' | jq -r ' .[0].version' )} "
17
20
current=" $( /usr/local/go/bin/go version 2> /dev/null | awk ' {print $3}' ) "
You can’t perform that action at this time.
0 commit comments