-
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathinstall.sh
More file actions
33 lines (28 loc) · 805 Bytes
/
Copy pathinstall.sh
File metadata and controls
33 lines (28 loc) · 805 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#!/usr/bin/env sh
set -e
PACKAGE="@mulham28/pkgmap"
BREW_TAP="mulhamna/tap"
echo "Installing pkgmap..."
# macOS: prefer Homebrew
if [ "$(uname)" = "Darwin" ] && command -v brew >/dev/null 2>&1; then
brew install "$BREW_TAP/pkgmap"
exit 0
fi
# Fallback: npm ecosystem (npm, pnpm, yarn, bun)
if command -v npm >/dev/null 2>&1; then
npm install -g "$PACKAGE"
elif command -v pnpm >/dev/null 2>&1; then
pnpm add -g "$PACKAGE"
elif command -v yarn >/dev/null 2>&1; then
yarn global add "$PACKAGE"
elif command -v bun >/dev/null 2>&1; then
bun add -g "$PACKAGE"
else
echo ""
echo "Error: no supported package manager found."
echo "Install Node.js from https://nodejs.org, then run:"
echo " npm install -g $PACKAGE"
exit 1
fi
echo ""
echo "pkgmap installed successfully. Run: pkgmap"