Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 23 additions & 4 deletions install.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

#!/bin/bash

set -ex
Expand All @@ -8,13 +7,33 @@ cd "${script_dir}"

echo "Docs directory: $script_dir"

#Check if bun is installed
# Function to detect the current shell and source the appropriate rc file
source_rc_file() {
local shell_name=$(basename "$SHELL")
case "$shell_name" in
bash)
source "$HOME/.bashrc"
;;
zsh)
source "$HOME/.zshrc"
;;
fish)
source "$HOME/.config/fish/config.fish"
;;
*)
echo "Unsupported shell: $shell_name"
exit 1
;;
esac
}

# Check if bun is installed
if ! command -v bun &> /dev/null; then
echo "Bun is not installed. Installing..."
curl -fsSL https://bun.sh/install | bash
source_rc_file
else
echo "Bun is already installed."
fi

bun install

bun install
Loading