-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathboot.sh
More file actions
executable file
·43 lines (34 loc) · 1.33 KB
/
boot.sh
File metadata and controls
executable file
·43 lines (34 loc) · 1.33 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
#!/bin/bash
set -e
ascii_art=$(cat <<'EOF'
______ __ __ __ __
____ _ ____
/ ___|___ __| | ___ / ___|___ _ __ ___ _ __ __ _ ___ ___
| | / _ \ / _` |/ _ \ | / _ \| _ _ _| _ \ / _` / __/ __|
| |__| (_) | (_| | __/ |__| (_) | | | | | |_) | (_| \__ \__ \
\____\___/ \__,_|\___|\____\___/|_| |_| |_| .__/ \__,_|___/___/
|_|
C O D E C O M P A S S
EOF
)
echo -e "$ascii_art"
echo "=> codekub is for fresh Ubuntu 24.04+ installations only!"
echo -e "\nBegin installation (or abort with ctrl+c)..."
sudo apt-get update >/dev/null
sudo apt-get install -y git >/dev/null
echo "Cloning codekub using default branch ..."
rm -rf ~/.local/share/omakub
git clone https://github.com/CodeCompasss/codekub.git ~/.local/share/omakub >/dev/null
cd ~/.local/share/omakub
current_branch=$(git rev-parse --abbrev-ref HEAD)
echo "✅ Cloned branch: $current_branch"
# Optionally switch to a specific branch if OMAKUB_REF is set
if [[ -n "$OMAKUB_REF" ]]; then
git fetch origin "$OMAKUB_REF"
git checkout "$OMAKUB_REF"
current_branch=$(git rev-parse --abbrev-ref HEAD)
echo "✅ Switched to branch: $current_branch"
fi
cd -
echo "Installation starting..."
source ~/.local/share/omakub/install.sh