Repository navigation
Expand file tree
/
Copy pathinstall.sh
More file actions
executable file
·209 lines (183 loc) · 7.9 KB
/
Copy pathinstall.sh
File metadata and controls
executable file
·209 lines (183 loc) · 7.9 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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
#!/usr/bin/env bash
# ============================================================
# KURWA LINUX INSTALLER v1.0
# Arch/EndeavourOS rage customization layer
# Bóbr-powered. Zero responsibility. Maximum sarcasm.
# ============================================================
set -e
RED='\033[0;31m'
YELLOW='\033[1;33m'
GREEN='\033[0;32m'
CYAN='\033[0;36m'
PURPLE='\033[0;35m'
BOLD='\033[1m'
DIM='\033[2m'
NC='\033[0m'
REPO_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
BACKUP_SUFFIX="bak-kurwa-$(date +%Y%m%d%H%M%S)"
banner() {
echo -e "${RED}"
cat << 'ASCIIEOF'
██╗ ██╗██╗ ██╗██████╗ ██╗ ██╗ █████╗ ██╗ ██╗███╗ ██╗██╗ ██╗██╗ ██╗
██║ ██╔╝██║ ██║██╔══██╗██║ ██║██╔══██╗ ██║ ██║████╗ ██║██║ ██║╚██╗██╔╝
█████╔╝ ██║ ██║██████╔╝██║ █╗ ██║███████║ ██║ ██║██╔██╗ ██║██║ ██║ ╚███╔╝
██╔═██╗ ██║ ██║██╔══██╗██║███╗██║██╔══██║ ██║ ██║██║╚██╗██║██║ ██║ ██╔██╗
██║ ██╗╚██████╔╝██║ ██║╚███╔███╔╝██║ ██║ ███████╗██║██║ ╚████║╚██████╔╝██╔╝ ██╗
╚═╝ ╚═╝ ╚═════╝ ╚═╝ ╚═╝ ╚══╝╚══╝ ╚═╝ ╚═╝ ╚══════╝╚═╝╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝
ASCIIEOF
echo -e "${NC}"
echo -e "${YELLOW} 🦫 INSTALLER v1.0 — Bóbr-Powered, Zero Responsibility 🦫${NC}"
echo -e "${DIM} \"It works on my machine\" — Castor fiber${NC}"
echo ""
}
check_pacman() {
if ! command -v pacman &>/dev/null; then
echo -e "${RED}Kurwa — no pacman found.${NC}"
echo -e "${DIM}This is Arch-only. Ubuntu is that way. → → →${NC}"
exit 1
fi
}
confirm() {
echo -e "${YELLOW}⚠️ This will install Kurwa Linux on your system.${NC}"
echo -e "${CYAN} Your .bashrc will be backed up first (as .bashrc.${BACKUP_SUFFIX}).${NC}"
echo -e "${DIM} Probably safe. The bóbr has reviewed the script. He has notes.${NC}"
echo ""
read -rp "Continue? [y/N] " response
case "$response" in
[yY]) echo "" ;;
*)
echo -e "${RED}Coward. The bóbr is unsurprised. Goodbye.${NC}"
exit 0
;;
esac
}
step() { echo -e "${CYAN}[${1}/${STEPS}] ${2}${NC}"; }
ok() { echo -e "${GREEN} ✓ ${1}${NC}"; }
warn() { echo -e "${YELLOW} ⚠ ${1}${NC}"; }
info() { echo -e "${DIM} ${1}${NC}"; }
STEPS=6
backup_bashrc() {
step 1 "Backing up .bashrc..."
cp ~/.bashrc ~/.bashrc."${BACKUP_SUFFIX}"
ok "Backup saved as ~/.bashrc.${BACKUP_SUFFIX}"
info "You know where it is. The bóbr also knows."
}
install_deps() {
step 2 "Installing dependencies..."
info "cowsay figlet lolcat neofetch — critical infrastructure, kurwa"
sudo pacman -S --needed --noconfirm cowsay figlet lolcat neofetch 2>/dev/null \
&& ok "Dependencies installed. The bóbr approves of cowsay especially." \
|| warn "Not everything installed cleanly. Check it yourself. Classic."
}
install_aliases() {
step 3 "Injecting rage aliases into ~/.bashrc..."
# Nuke any previous kurwa block
sed -i '/# >>> KURWA LINUX START >>>/,/# <<< KURWA LINUX END <<</d' ~/.bashrc
cat >> ~/.bashrc << 'KURWAEOF'
# >>> KURWA LINUX START >>>
# Kurwa Linux — do not remove this block, kurwa
# The bóbr wrote this at 4am. It is perfect.
kurwa() {
echo -e "\033[0;31m"
echo " ╔══════════════════════════════════╗"
echo " ║ KURWA MODE: ACTIVATED 🔥🦫 ║"
echo " ║ The bóbr has been summoned. ║"
echo " ║ God has been notified. Kurwa. ║"
echo " ╚══════════════════════════════════╝"
echo -e "\033[0m"
cowsay -f tux "BOBR KURWA!" 2>/dev/null || echo "🦫 BOBR KURWA!"
echo ""
echo "Updating the system, kurwa..."
sudo pacman -Syu --noconfirm
echo ""
echo -e "\033[0;32mSystem fresh as a beaver after a bath. Kurwa.\033[0m"
}
install() {
if [ -z "$1" ]; then
echo "Kurwa — install WHAT exactly? Give me a package name, not a blank stare."
return 1
fi
sudo pacman -S "$@" \
|| echo -e "\033[0;31mKurwa — package '$*' not found. What are you even doing.\033[0m"
}
remove() {
if [ -z "$1" ]; then
echo "Remove what? The void? Give me a package name, kurwa."
return 1
fi
sudo pacman -Rns "$@" \
&& echo "Gone. Good riddance. The bóbr feels nothing. 🦫" \
|| echo "Cannot remove. Probably a dependency. Think before you type. Kurwa."
}
update() { kurwa; }
# Convenience trap: yell on errors (uncomment if you enjoy chaos)
# trap 'echo -e "\033[0;31m[kurwa] error in line $LINENO — you did this.\033[0m"' ERR
# PATH for kurwa bin scripts
export PATH="$HOME/.local/bin:$PATH"
# <<< KURWA LINUX END <<<
KURWAEOF
ok "Aliases injected. Your terminal now has opinions."
}
install_motd() {
step 4 "Setting up login MOTD..."
local motd_src="${REPO_DIR}/motd/kurwa.motd"
if [[ -f "$motd_src" ]]; then
grep -q "kurwa.motd" ~/.bash_profile 2>/dev/null \
|| echo "[ -f \"${motd_src}\" ] && bash \"${motd_src}\"" >> ~/.bash_profile
ok "MOTD configured — the bóbr will greet you on every login"
else
warn "motd/kurwa.motd not found. The bóbr is disappointed but not surprised."
fi
}
install_bin() {
step 5 "Installing bin/ scripts to ~/.local/bin..."
mkdir -p ~/.local/bin
local installed=0
for f in "${REPO_DIR}"/bin/*; do
[[ -f "$f" ]] || continue
chmod +x "$f"
cp "$f" ~/.local/bin/
installed=$((installed + 1))
done
if [[ $installed -gt 0 ]]; then
ok "Installed $installed scripts — kurwa, beaver, wtf, kurwa-status, kurwa-help, bobr"
else
warn "No bin/ scripts found. Did you git clone properly? The bóbr asks."
fi
}
install_neofetch() {
step 6 "Configuring neofetch (bóbr edition)..."
local conf_dir="$HOME/.config/neofetch"
local conf_src="${REPO_DIR}/themes/neofetch-bobr.conf"
mkdir -p "$conf_dir"
if [[ -f "$conf_src" ]]; then
cp "$conf_src" "$conf_dir/config.conf"
ok "Neofetch configured — bóbr-themed, dark, opinionated"
else
warn "neofetch-bobr.conf not found. Skipping. The bóbr shrugs."
fi
}
finish() {
echo ""
echo -e "${RED}━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━${NC}"
echo -e "${BOLD}${GREEN} ✅ KURWA LINUX INSTALLED SUCCESSFULLY${NC}"
echo -e "${RED}━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━${NC}"
echo ""
echo -e " 1. ${CYAN}source ~/.bashrc${NC}"
echo -e " 2. ${CYAN}kurwa${NC}"
echo ""
echo -e " ${DIM}The bóbr is already watching. He was watching before you ran this.${NC}"
echo -e " ${YELLOW}🦫 Welcome to Kurwa Linux. You cannot leave.${NC}"
echo ""
}
# ── MAIN ──────────────────────────────────────────────────
banner
check_pacman
confirm
backup_bashrc
install_deps
install_aliases
install_motd
install_bin
install_neofetch
finish