forked from defunkt/toes
idempotent install script
This commit is contained in:
parent
f8c5890e07
commit
845479fa91
|
|
@ -53,9 +53,7 @@ if [ ! -x "$BUN" ]; then
|
||||||
[ -x "$BUN" ] || fail "bun installation failed."
|
[ -x "$BUN" ] || fail "bun installation failed."
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ ! -x /usr/local/bin/bun ]; then
|
|
||||||
sudo ln -sf "$BUN" /usr/local/bin/bun
|
sudo ln -sf "$BUN" /usr/local/bin/bun
|
||||||
fi
|
|
||||||
|
|
||||||
sudo setcap 'cap_net_bind_service=+ep' "$BUN"
|
sudo setcap 'cap_net_bind_service=+ep' "$BUN"
|
||||||
|
|
||||||
|
|
@ -72,15 +70,17 @@ fi
|
||||||
|
|
||||||
# ── Directories ──────────────────────────────────────────
|
# ── Directories ──────────────────────────────────────────
|
||||||
|
|
||||||
mkdir -p "$APPS_DIR" "$DATA_DIR"
|
mkdir -p "$APPS_DIR" "$DATA_DIR" "$DATA_DIR/toes"
|
||||||
|
|
||||||
# ── Dependencies & build ─────────────────────────────────
|
# ── Dependencies & build ─────────────────────────────────
|
||||||
|
|
||||||
|
cd "$DEST"
|
||||||
|
|
||||||
info "Installing dependencies"
|
info "Installing dependencies"
|
||||||
cd "$DEST" && quiet bun install
|
quiet bun install
|
||||||
|
|
||||||
info "Building"
|
info "Building"
|
||||||
cd "$DEST" && quiet bun run build
|
quiet bun run build
|
||||||
|
|
||||||
# ── Bundled apps ─────────────────────────────────────────
|
# ── Bundled apps ─────────────────────────────────────────
|
||||||
|
|
||||||
|
|
@ -106,7 +106,7 @@ sudo systemctl restart toes
|
||||||
|
|
||||||
# ── Done ─────────────────────────────────────────────────
|
# ── Done ─────────────────────────────────────────────────
|
||||||
|
|
||||||
VERSION=$(cd "$DEST" && git describe --tags --always 2>/dev/null || echo "unknown")
|
VERSION=$(git describe --tags --always 2>/dev/null || echo "unknown")
|
||||||
|
|
||||||
echo ""
|
echo ""
|
||||||
echo " toes $VERSION is running!"
|
echo " toes $VERSION is running!"
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user