forked from basecamp/omarchy
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathboot.sh
More file actions
executable file
·52 lines (41 loc) · 3.26 KB
/
Copy pathboot.sh
File metadata and controls
executable file
·52 lines (41 loc) · 3.26 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
# Set install mode to online since boot.sh is used for curl installations
export AICOMPUTER_ONLINE_INSTALL=true
ansi_art='
░███ ░██████ ░██████ ░██
░██░██ ░██ ░██ ░██ ░██
░██ ░██ ░██ ░██ ░███████ ░█████████████ ░████████ ░██ ░██ ░████████ ░███████ ░██░████
░█████████ ░██ ░██ ░██ ░██ ░██ ░██ ░██ ░██ ░██ ░██ ░██ ░██ ░██ ░██ ░███
░██ ░██ ░██ ░██ ░██ ░██ ░██ ░██ ░██ ░██ ░██ ░██ ░██ ░██ ░█████████ ░██
░██ ░██ ░██ ░██ ░██ ░██ ░██ ░██ ░██ ░██ ░███ ░██ ░██ ░███ ░██ ░██ ░██
░██ ░██ ░██████ ░██████ ░███████ ░██ ░██ ░██ ░██░█████ ░█████░██ ░████ ░███████ ░██
░██
░██
'
clear
echo -e "\n$ansi_art\n"
# Use custom branch if instructed, otherwise default to master
AICOMPUTER_REF="${AICOMPUTER_REF:-master}"
# Set mirror based on branch
if [[ $AICOMPUTER_REF == "dev" ]]; then
export AICOMPUTER_MIRROR=edge
echo 'Server = https://mirror.aicomputer.org/$repo/os/$arch' | sudo tee /etc/pacman.d/mirrorlist >/dev/null
elif [[ $AICOMPUTER_REF == "rc" ]]; then
export AICOMPUTER_MIRROR=rc
echo 'Server = https://rc-mirror.aicomputer.org/$repo/os/$arch' | sudo tee /etc/pacman.d/mirrorlist >/dev/null
else
export AICOMPUTER_MIRROR=stable
echo 'Server = https://stable-mirror.aicomputer.org/$repo/os/$arch' | sudo tee /etc/pacman.d/mirrorlist >/dev/null
fi
sudo pacman -Syu --noconfirm --needed git
# Use custom repo if specified, otherwise default to basecamp/aicomputer
AICOMPUTER_REPO="${AICOMPUTER_REPO:-basecamp/aicomputer}"
echo -e "\nCloning AI Computer from: https://github.com/${AICOMPUTER_REPO}.git"
rm -rf ~/.local/share/aicomputer/
git clone "https://github.com/${AICOMPUTER_REPO}.git" ~/.local/share/aicomputer >/dev/null
echo -e "\e[32mUsing branch: $AICOMPUTER_REF\e[0m"
cd ~/.local/share/aicomputer
git fetch origin "${AICOMPUTER_REF}" && git checkout "${AICOMPUTER_REF}"
cd -
echo -e "\nInstallation starting..."
source ~/.local/share/aicomputer/install.sh