Updates
This commit is contained in:
parent
cfb1f1c047
commit
b6f81adc5d
28
.install/diagnosis.sh
Normal file
28
.install/diagnosis.sh
Normal file
@ -0,0 +1,28 @@
|
||||
echo -e "${GREEN}"
|
||||
figlet "System check"
|
||||
echo -e "${NONE}"
|
||||
|
||||
echo "The system check will test that essential packages and "
|
||||
echo "execution commands are available now on your system."
|
||||
|
||||
if gum confirm "Do you want to run a short system check?" ;then
|
||||
|
||||
_folderExists "$HOME/dotfiles" "Please repeat the installation."
|
||||
_commandExists "rofi" "rofi-wayland"
|
||||
_commandExists "dunst" "dunst"
|
||||
_commandExists "waybar" "waybar"
|
||||
_commandExists "hyprpaper" "hyprpaper"
|
||||
_commandExists "hyprlock" "hyprpaper"
|
||||
_commandExists "hypridle" "hyprpaper"
|
||||
_commandExists "wal" "python-pywal"
|
||||
_commandExists "gum" "gum"
|
||||
_commandExists "wlogout" "wlogout"
|
||||
_commandExists "eww" "eww"
|
||||
_commandExists "magick" "imagemagick"
|
||||
|
||||
elif [ $? -eq 130 ]; then
|
||||
exit 130
|
||||
else
|
||||
echo ":: System check skipped"
|
||||
fi
|
||||
echo ""
|
@ -272,4 +272,26 @@ _replaceLineInFile() {
|
||||
echo "ERROR: Target file not found."
|
||||
sleep 2
|
||||
fi
|
||||
}
|
||||
|
||||
# ------------------------------------------------------
|
||||
# System check
|
||||
# ------------------------------------------------------
|
||||
|
||||
_commandExists() {
|
||||
package="$1";
|
||||
if ! type $package > /dev/null 2>&1; then
|
||||
echo ":: ERROR: $package doesn't exists. Please install it with yay -S $2"
|
||||
else
|
||||
echo ":: OK: $package command found."
|
||||
fi
|
||||
}
|
||||
|
||||
_folderExists() {
|
||||
folder="$1";
|
||||
if [ ! -d $folder ]; then
|
||||
echo ":: ERROR: $folder doesn't exists. $2"
|
||||
else
|
||||
echo ":: OK: $folder found."
|
||||
fi
|
||||
}
|
@ -11,7 +11,6 @@ packagesPacman=(
|
||||
"dunst"
|
||||
"starship"
|
||||
"mpv"
|
||||
"freerdp"
|
||||
"thunar"
|
||||
"mousepad"
|
||||
"noto-fonts"
|
||||
|
@ -80,5 +80,6 @@ source .install/apps.sh
|
||||
source .install/gtk.sh
|
||||
source .install/bashrc.sh
|
||||
source .install/cleanup.sh
|
||||
source .install/diagnosis.sh
|
||||
source .install/reboot.sh
|
||||
sleep 3
|
||||
|
@ -9,8 +9,8 @@ echo
|
||||
|
||||
_commandExists() {
|
||||
package="$1";
|
||||
if ! type $package > /dev/null; then
|
||||
echo ":: ERROR: $package doesn't exists. Please install it."
|
||||
if ! type $package > /dev/null 2>&1; then
|
||||
echo ":: ERROR: $package doesn't exists. Please install it with yay -S $2"
|
||||
else
|
||||
echo ":: OK: $package found."
|
||||
fi
|
||||
@ -25,21 +25,20 @@ _folderExists() {
|
||||
fi
|
||||
}
|
||||
|
||||
_commandExists "rofi"
|
||||
_commandExists "dunst"
|
||||
_commandExists "waybar"
|
||||
_commandExists "hyprpaper"
|
||||
_commandExists "hyprlock"
|
||||
_commandExists "hypridle"
|
||||
_commandExists "wal"
|
||||
_commandExists "gum"
|
||||
_commandExists "wlogout"
|
||||
_commandExists "wal"
|
||||
_commandExists "swww"
|
||||
_commandExists "eww"
|
||||
_commandExists "magick"
|
||||
_commandExists "figlet"
|
||||
_commandExists "rofi" "rofi-wayland"
|
||||
_commandExists "dunst" "dunst"
|
||||
_commandExists "waybar" "waybar"
|
||||
_commandExists "hyprpaper" "hyprpaper"
|
||||
_commandExists "hyprlock" "hyprpaper"
|
||||
_commandExists "hypridle" "hyprpaper"
|
||||
_commandExists "wal" "python-pywal"
|
||||
_commandExists "gum" "gum"
|
||||
_commandExists "wlogout" "wlogout"
|
||||
_commandExists "swww" "swww"
|
||||
_commandExists "eww" "eww"
|
||||
_commandExists "magick2" "imagemagick"
|
||||
_commandExists "figlet2" "figlet"
|
||||
|
||||
echo
|
||||
echo "Press return to close the window"
|
||||
echo "Press return to exit"
|
||||
read
|
Loading…
x
Reference in New Issue
Block a user