Compare commits
6 commits
cedc350f6d
...
16bf930901
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
16bf930901 | ||
|
|
35428bea93 | ||
|
|
95d588da48 | ||
|
|
6a572ee102 | ||
|
|
0d7d563db4 | ||
|
|
06ec5d40db |
1 changed files with 26 additions and 9 deletions
35
install.sh
35
install.sh
|
|
@ -1,5 +1,8 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
|
# --- Clear Screen ---
|
||||||
|
clear
|
||||||
|
|
||||||
# --- Functions ---
|
# --- Functions ---
|
||||||
# Styling
|
# Styling
|
||||||
function styleColor {
|
function styleColor {
|
||||||
|
|
@ -64,7 +67,7 @@ function displayCmd {
|
||||||
|
|
||||||
# Packages
|
# Packages
|
||||||
function updatePackage {
|
function updatePackage {
|
||||||
displayCmd "xbps-install -S" "Updating Repositories"
|
displayCmd "xbps-install -Sy" "Updating Repositories"
|
||||||
}
|
}
|
||||||
function addPackage {
|
function addPackage {
|
||||||
displayCmd "xbps-install -y $1" "Adding Repository $1"
|
displayCmd "xbps-install -y $1" "Adding Repository $1"
|
||||||
|
|
@ -79,8 +82,22 @@ function getFlatpak {
|
||||||
displayCmd "flatpak install -y $1" "Installing (flatpak) $1"
|
displayCmd "flatpak install -y $1" "Installing (flatpak) $1"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# --- Priv Check ---
|
||||||
|
if [ $EUID -ne 0 ]; then
|
||||||
|
displayTitle "FATAL ERROR"
|
||||||
|
echo -e "Please run the script with $(styleColor "cyan")\`sudo\`$(styleColorRst) or login as $(styleColor "cyan")root$(styleColorRst).\n"
|
||||||
|
exit
|
||||||
|
fi
|
||||||
|
|
||||||
|
# --- Variables ---
|
||||||
|
HOMEDIR=""
|
||||||
|
if [ -n "$SUDO_USER" ]; then
|
||||||
|
HOMEDIR="/home/${SUDO_USER}"
|
||||||
|
else
|
||||||
|
HOMEDIR="$HOME"
|
||||||
|
fi
|
||||||
|
|
||||||
# --- Entry Point ---
|
# --- Entry Point ---
|
||||||
clear
|
|
||||||
displayTitle "OBJNULL Dotfile Installer"
|
displayTitle "OBJNULL Dotfile Installer"
|
||||||
|
|
||||||
echo -e "--- $(styleColor "yellow")NOTE$(styleColorRst) ---"
|
echo -e "--- $(styleColor "yellow")NOTE$(styleColorRst) ---"
|
||||||
|
|
@ -113,13 +130,13 @@ getPackage "flatpak"
|
||||||
displayCmd "flatpak remote-add --if-not-exists flathub https://dl.flathub.org/repo/flathub.flatpakrepo" "Adding Flathub to Flatpak Repos"
|
displayCmd "flatpak remote-add --if-not-exists flathub https://dl.flathub.org/repo/flathub.flatpakrepo" "Adding Flathub to Flatpak Repos"
|
||||||
getFlatpak "com.github.tchx84.Flatseal"
|
getFlatpak "com.github.tchx84.Flatseal"
|
||||||
getFlatpak "io.gitlab.librewolf-community"
|
getFlatpak "io.gitlab.librewolf-community"
|
||||||
getFlatpak "noto-fonts-emoji"
|
getPackage "noto-fonts-emoji"
|
||||||
getFlatpak "yazi helix lazygit iamb"
|
getPackage "yazi helix lazygit iamb"
|
||||||
|
|
||||||
# --- Configurations ---
|
# --- Configurations ---
|
||||||
displayTitle "Configurations"
|
displayTitle "Configurations"
|
||||||
displayCmd "mkdir ~/.config" "Creating config directory"
|
displayCmd "mkdir ${HOMEDIR}/.config" "Creating config directory"
|
||||||
displayCmd "cp -r .config ${PWD}/.config" "Installing configs"
|
displayCmd "cp -r .config ${HOMEDIR}/.config" "Installing configs"
|
||||||
displayCmd "cp .bashrc ${PWD}/.bashrc" "Installing bash profile"
|
displayCmd "cp .bashrc ${HOMEDIR}/.bashrc" "Installing bash profile"
|
||||||
displayCmd "cp -r Pictures ${PWD}/Pictures" "Installing pictures"
|
displayCmd "cp -r Pictures ${HOMEDIR}/Pictures" "Installing pictures"
|
||||||
displayCmd "cp -r /etc/xdg/quickshell ${PWD}/.config/." "Installing quickshell config"
|
displayCmd "cp -r /etc/xdg/quickshell ${HOMEDIR}/.config/." "Installing quickshell config"
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue