-
-
Notifications
You must be signed in to change notification settings - Fork 12
Expand file tree
/
Copy pathinstall.sh
More file actions
executable file
·53 lines (47 loc) · 1.34 KB
/
install.sh
File metadata and controls
executable file
·53 lines (47 loc) · 1.34 KB
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
#!/bin/bash
# Bash/Zsh Install Script for copilot_here
# Downloads the script and runs the update function
# Download the main script
SCRIPT_PATH="$HOME/.copilot_here.sh"
echo "📥 Downloading copilot_here.sh..."
if ! curl -fsSL "https://github.com/GordonBeeming/copilot_here/releases/download/cli-latest/copilot_here.sh" -o "$SCRIPT_PATH"; then
echo "❌ Failed to download copilot_here.sh" >&2
return 1
fi
echo "✅ Downloaded to: $SCRIPT_PATH"
# Source the script to load functions
echo "🔄 Loading copilot_here functions..."
# shellcheck disable=SC1090
if ! source "$SCRIPT_PATH"; then
echo "❌ Failed to load copilot_here functions" >&2
return 1
fi
# Run update to set up everything (binary, profiles, etc.)
echo ""
echo "📦 Running update..."
copilot_here --update
# Run install-shells to set up shell integration
echo ""
echo "🔧 Setting up shell integration..."
copilot_here --install-shells
echo ""
echo "✅ Installation complete!"
if [ -n "$COPILOT_HERE_VERSION" ]; then
echo " Loaded version: $COPILOT_HERE_VERSION"
fi
echo ""
echo "⚠️ Please restart your shell or run:"
CURRENT_SHELL=$(basename "$SHELL")
case "$CURRENT_SHELL" in
zsh)
echo " source ~/.zshrc"
;;
bash)
echo " source ~/.bashrc"
;;
*)
echo " source ~/.${CURRENT_SHELL}rc"
;;
esac
echo ""
echo "Then try: copilot_here --help"