Updates #2
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 ""
|
@ -273,3 +273,25 @@ _replaceLineInFile() {
|
|||||||
sleep 2
|
sleep 2
|
||||||
fi
|
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"
|
"dunst"
|
||||||
"starship"
|
"starship"
|
||||||
"mpv"
|
"mpv"
|
||||||
"freerdp"
|
|
||||||
"thunar"
|
"thunar"
|
||||||
"mousepad"
|
"mousepad"
|
||||||
"noto-fonts"
|
"noto-fonts"
|
||||||
|
@ -80,5 +80,6 @@ source .install/apps.sh
|
|||||||
source .install/gtk.sh
|
source .install/gtk.sh
|
||||||
source .install/bashrc.sh
|
source .install/bashrc.sh
|
||||||
source .install/cleanup.sh
|
source .install/cleanup.sh
|
||||||
|
source .install/diagnosis.sh
|
||||||
source .install/reboot.sh
|
source .install/reboot.sh
|
||||||
sleep 3
|
sleep 3
|
||||||
|
@ -9,8 +9,8 @@ echo
|
|||||||
|
|
||||||
_commandExists() {
|
_commandExists() {
|
||||||
package="$1";
|
package="$1";
|
||||||
if ! type $package > /dev/null; then
|
if ! type $package > /dev/null 2>&1; then
|
||||||
echo ":: ERROR: $package doesn't exists. Please install it."
|
echo ":: ERROR: $package doesn't exists. Please install it with yay -S $2"
|
||||||
else
|
else
|
||||||
echo ":: OK: $package found."
|
echo ":: OK: $package found."
|
||||||
fi
|
fi
|
||||||
@ -25,21 +25,20 @@ _folderExists() {
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
_commandExists "rofi"
|
_commandExists "rofi" "rofi-wayland"
|
||||||
_commandExists "dunst"
|
_commandExists "dunst" "dunst"
|
||||||
_commandExists "waybar"
|
_commandExists "waybar" "waybar"
|
||||||
_commandExists "hyprpaper"
|
_commandExists "hyprpaper" "hyprpaper"
|
||||||
_commandExists "hyprlock"
|
_commandExists "hyprlock" "hyprpaper"
|
||||||
_commandExists "hypridle"
|
_commandExists "hypridle" "hyprpaper"
|
||||||
_commandExists "wal"
|
_commandExists "wal" "python-pywal"
|
||||||
_commandExists "gum"
|
_commandExists "gum" "gum"
|
||||||
_commandExists "wlogout"
|
_commandExists "wlogout" "wlogout"
|
||||||
_commandExists "wal"
|
_commandExists "swww" "swww"
|
||||||
_commandExists "swww"
|
_commandExists "eww" "eww"
|
||||||
_commandExists "eww"
|
_commandExists "magick2" "imagemagick"
|
||||||
_commandExists "magick"
|
_commandExists "figlet2" "figlet"
|
||||||
_commandExists "figlet"
|
|
||||||
|
|
||||||
echo
|
echo
|
||||||
echo "Press return to close the window"
|
echo "Press return to exit"
|
||||||
read
|
read
|
Loading…
x
Reference in New Issue
Block a user