Skip to content

Commit

Permalink
Script Fixes (#1)
Browse files Browse the repository at this point in the history
  • Loading branch information
harilvfs authored Oct 8, 2024
1 parent ae920d2 commit d53c591
Showing 1 changed file with 17 additions and 6 deletions.
23 changes: 17 additions & 6 deletions setup.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/bash

set -e # Exit immediately if a command exits with a non-zero status
set -o pipefail # Return the exit status of the last command in the pipe that failed
set -e
set -o pipefail

echo -ne "
███████╗██╗ ██╗ █████╗ ██╗ ██╗
@@ -16,14 +16,26 @@ echo -ne "
-----------------------------------------
"

# Step 1: Install dependencies

echo -e "\033[1;32mInstalling dependencies...\033[0m"
if ! sudo pacman -S --noconfirm sway wlroots fastfetch fish foot nwg-drawer swappy swaylock swayr waybar wayland pango cairo gdk-pixbuf2 json-c scdoc meson ninja pcre2 gtk-layer-shell jsoncpp libsigc++ libdbusmenu-gtk3 libxkbcommon fmt spdlog glibmm gtkmm3 alsa-utils pulseaudio libnl iw wob swaybg swayidle swaylock alacritty wofi wl-clipboard grim slurp mako ttf-nerd-fonts-symbols-mono; then
echo -e "\033[1;31mFailed to install dependencies\033[0m"
exit 1
fi

# Step 2: Apply the CyberEXS GRUB theme
echo -e "\033[1;32mCloning Sway dotfiles...\033[0m"
if ! git clone https://github.com/harilvfs/swaydotfiles /tmp/swaydotfiles; then
echo -e "\033[1;31mFailed to clone Sway dotfiles repository\033[0m"
exit 1
fi

cd /tmp/swaydotfiles
echo -e "\033[1;32mMoving Sway dotfiles to ~/.config...\033[0m"
if ! mv * ~/.config/; then
echo -e "\033[1;31mFailed to move Sway dotfiles to ~/.config\033[0m"
exit 1
fi

echo -e "\033[1;32mCloning CyberEXS GRUB theme repository...\033[0m"
if ! git clone https://github.com/HenriqueLopes42/themeGrub.CyberEXS; then
echo -e "\033[1;31mFailed to clone GRUB theme repository\033[0m"
@@ -41,7 +53,6 @@ if ! echo 'GRUB_THEME="/usr/share/grub/themes/CyberEXS/theme.txt"' | sudo tee -a
exit 1
fi

# Step 3: Update GRUB based on the OS
if [ -f /etc/debian_version ]; then
echo -e "\033[1;32mUpdating GRUB for Debian-based systems...\033[0m"
if ! sudo update-grub; then
@@ -58,4 +69,4 @@ else
echo -e "\033[1;33mUnknown system type. Skipping GRUB update.\033[0m"
fi

echo -e "\033[1;34mCyberEXS GRUB theme applied successfully!\033[0m"
echo -e "\033[1;34mSway Dotfiles setup and CyberEXS GRUB theme applied successfully!\033[0m"

0 comments on commit d53c591

Please sign in to comment.