Something went wrong. Try again.
open source is social v-it.org
Something went wrong. Try again.
12345678910111213141516171819202122232425262728293031323334353637383940414243#!/bin/shset -e
SELF="solpbc/vit"
command_exists() { command -v "$1" >/dev/null 2>&1}
echo "installing vit from source ($SELF)..."
if ! command_exists git; then echo "error: git is required. install git and try again." exit 1fi
if ! command_exists bun; then echo "bun not found, installing..." curl -fsSL https://bun.sh/install | bash export BUN_INSTALL="$HOME/.bun" export PATH="$BUN_INSTALL/bin:$PATH"fi
DIR_NAME=$(echo "$SELF" | sed 's|.*/||')if [ -d "$DIR_NAME" ]; then echo "$DIR_NAME/ already exists, skipping clone"else if command_exists gh; then gh repo clone "$SELF" "$DIR_NAME" else git clone "https://github.com/$SELF.git" "$DIR_NAME" fifi
cd "$DIR_NAME"
bun installnode bin/vit.js link
echo ""echo "vit installed from source"echo "run: cd $DIR_NAME"