Skip to content

Commit 7e628cc

Browse files
authored
chore(spartan): making the spartan script install jq (#11231)
I'd say not needed for most distros, but happens in some alpines and etc
1 parent ffd3625 commit 7e628cc

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

spartan/releases/create-spartan.sh

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,3 +18,19 @@ else
1818
echo -e "${RED}✗ Failed to download aztec-spartan.sh${NC}"
1919
exit 1
2020
fi
21+
22+
# Check if jq is installed
23+
if ! command -v jq &> /dev/null; then
24+
echo "jq is not installed. Installing jq..."
25+
if command -v apt-get &> /dev/null; then
26+
sudo apt-get update && sudo apt-get install -y jq
27+
elif command -v yum &> /dev/null; then
28+
sudo yum install -y jq
29+
elif command -v brew &> /dev/null; then
30+
brew install jq
31+
else
32+
echo -e "${RED}✗ Could not install jq. Please install it manually.${NC}"
33+
exit 1
34+
fi
35+
echo -e "${GREEN}✓ jq has been installed${NC}"
36+
fi

0 commit comments

Comments
 (0)