refactor: scripts structure

This commit is contained in:
hesam-init 2024-03-22 12:06:04 +03:30
parent 5afe738805
commit 792e157815
4 changed files with 10 additions and 12 deletions

View file

@ -1,6 +1,6 @@
#!/bin/bash #!/bin/bash
source ./utils.sh source ../utils/main.sh
FONTS_DIR="../configs/host/ui/fonts" FONTS_DIR="../configs/host/ui/fonts"

View file

@ -1,6 +1,6 @@
#!/bin/bash #!/bin/bash
source ./utils.sh source ../utils/main.sh
UPDATE_PKGS=false UPDATE_PKGS=false
CLEAR_CACHE=false CLEAR_CACHE=false
@ -24,15 +24,6 @@ declare SERVICES=(
"crond" "crond"
) )
exec 1> >(tee "../hyprland_setup_log")
check() {
if [ "$1" != 0 ]; then
echo "$2 error : $1" | tee -a ../hyprland_setup_log
exit 1
fi
}
update_system() { update_system() {
log "Update xbps package manager" log "Update xbps package manager"
sudo xbps-install -u xbps sudo xbps-install -u xbps

View file

@ -13,3 +13,10 @@ check_sudo() {
exit 1 exit 1
fi fi
} }
check() {
if [ "$1" != 0 ]; then
echo "$2 error : $1" | tee -a ../hyprland_setup_log
exit 1
fi
}

View file

@ -1,6 +1,6 @@
#!/bin/bash #!/bin/bash
source ./scripts/utils.sh source ./scripts/utils/main.sh
CONFIGS_DIR="$(pwd)/configs" CONFIGS_DIR="$(pwd)/configs"
DOTFILES_DIR="$CONFIGS_DIR/dotfiles" DOTFILES_DIR="$CONFIGS_DIR/dotfiles"