Skip to content

Commit

Permalink
script permissions
Browse files Browse the repository at this point in the history
  • Loading branch information
rohanharikr committed Oct 23, 2023
1 parent e933f4f commit 061f1db
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"license": "MIT",
"scripts": {
"install": "cd src/protocol && npm i",
"postinstall": "node ./scripts/pre-requisites.mjs",
"postinstall": "node ./scripts/pre-requisites.sh",
"dev": "echo \"npm run dev does not exist.\nHellō Pages: npm run dev:pages\nHellō Protocol: npm run dev:proto\"",
"dev:proto": "cd src/protocol && vite --open",
"dev:pages": "vitepress dev src/pages --open",
Expand Down
8 changes: 6 additions & 2 deletions scripts/pre-requisites.sh
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,12 @@
requiredPackages=("gh" "git")

for pkg in "${requiredPackages[@]}"; do
if ! which "$pkg" &>/dev/null; then
if ! command -v "$pkg" &>/dev/null; then
echo "$pkg is not installed"
exit 1
fi
done
done

# All required packages are installed
echo "All required packages are installed"
exit 0

0 comments on commit 061f1db

Please sign in to comment.