-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstall_ubuntu.sh
More file actions
executable file
·62 lines (51 loc) · 1.51 KB
/
install_ubuntu.sh
File metadata and controls
executable file
·62 lines (51 loc) · 1.51 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
#!/bin/bash
# Ubuntu-specific dotfiles installation script
# Exit on error, undefined variables, and pipe failures
set -e
set -u
set -o pipefail
# Trap errors and show line number
trap 'echo "Error on line $LINENO. Exit code: $?"' ERR
# Source the shared Debian base functionality
source "$(dirname "$0")/install_debian_base.sh"
# Ubuntu-specific function to install Chrome via wget/dpkg
install_chrome_ubuntu() {
if command -v google-chrome >/dev/null 2>&1; then
echo "Chrome is already installed, skipping..."
return 0
fi
echo "Installing Chrome via direct download..."
local chrome_deb="google-chrome-stable_current_amd64.deb"
# Only download if not already present
if [ ! -f "$chrome_deb" ]; then
wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
fi
sudo dpkg -i "$chrome_deb"
# Fix any dependency issues
sudo apt install -f -y
rm -f "$chrome_deb"
}
# Ubuntu-specific function to install VSCode via Snap
install_vscode_ubuntu() {
echo "Installing VSCode via Snap..."
sudo snap install --classic code
sudo snap install shfmt
}
# Override the main install function for Ubuntu
main_install() {
check_sudo
install_base_packages
setup_zsh
install_vscode_ubuntu
install_homebrew
install_brew_packages
install_nerd_fonts
install_starship
install_uv
install_node
install_chrome_ubuntu
setup_dotfiles
echo 'Please restart your terminal.'
}
# Run the installation
main_install