forked from Shinonome/dots-hyprland
Fix issue form template
This commit is contained in:
@@ -7,9 +7,9 @@ cd "$(dirname "$0")";export base="$(pwd)"
|
|||||||
logfile=diagnose.log;rm $logfile
|
logfile=diagnose.log;rm $logfile
|
||||||
export LANG=C;export LC_ALL=C
|
export LANG=C;export LC_ALL=C
|
||||||
|
|
||||||
function d() { ii_diagnose "$@" 2>&1 | tee -a $logfile ; }
|
x() { ii_exec "$@" 2>&1 | tee -a $logfile ; }
|
||||||
function e() { ii_box "$@" | tee -a $logfile ; }
|
e() { ii_box "$@" | tee -a $logfile ; }
|
||||||
function ii_box() {
|
ii_box() {
|
||||||
length=$(echo "$1" | wc -L);total_width=$((length + 2))
|
length=$(echo "$1" | wc -L);total_width=$((length + 2))
|
||||||
#line=$(printf "═%.0s" $(seq 1 $total_width))
|
#line=$(printf "═%.0s" $(seq 1 $total_width))
|
||||||
#border_up="╔${line}╗";border_down="╚${line}╝"
|
#border_up="╔${line}╗";border_down="╚${line}╝"
|
||||||
@@ -21,31 +21,45 @@ function ii_box() {
|
|||||||
echo "$border_vertical $1 $border_vertical"
|
echo "$border_vertical $1 $border_vertical"
|
||||||
echo "$border_down"
|
echo "$border_down"
|
||||||
}
|
}
|
||||||
function ii_diagnose() {
|
ii_exec() {
|
||||||
printf "\n[===diagnose===] $*\n"
|
printf "\n[===diagnose===] $*\n"
|
||||||
"$@"
|
"$@"
|
||||||
err=$?;if [ ! $err -eq 0 ];then echo "[---EXIT $err---]";else echo "[---SUCCESS---]";fi
|
err=$?;if [ ! $err -eq 0 ];then echo "[---EXIT $err---]";else echo "[---SUCCESS---]";fi
|
||||||
}
|
}
|
||||||
|
ii_check_distro() {
|
||||||
|
lsb_release -a || cat /etc/os-release || cat /etc/lsb-release
|
||||||
|
}
|
||||||
|
|
||||||
|
e "Checking git repo info"
|
||||||
|
x git remote get-url origin
|
||||||
|
x git rev-parse HEAD
|
||||||
|
|
||||||
e "Checking distro"
|
e "Checking distro"
|
||||||
d cat /etc/*-release
|
x ii_check_distro
|
||||||
d lsb_release -a
|
|
||||||
|
|
||||||
e "Checking variables"
|
e "Checking variables"
|
||||||
d declare -p ILLOGICAL_IMPULSE_VIRTUAL_ENV
|
x declare -p XDG_BIN_HOME # ~/.local/bin
|
||||||
d declare -p XDG_BIN_HOME
|
x declare -p XDG_CACHE_HOME # ~/.cache
|
||||||
d declare -p XDG_CACHE_HOME
|
x declare -p XDG_CONFIG_HOME # ~/.config
|
||||||
d declare -p XDG_CONFIG_HOME
|
x declare -p XDG_DATA_HOME # ~/.local/share
|
||||||
d declare -p XDG_DATA_HOME
|
x declare -p XDG_STATE_HOME # ~/.local/state
|
||||||
d declare -p XDG_STATE_HOME
|
x declare -p ILLOGICAL_IMPULSE_VIRTUAL_ENV # $XDG_STATE_HOME/ags/.venv
|
||||||
|
|
||||||
e "Checking directories"
|
e "Checking directories/files"
|
||||||
d ls -l $ILLOGICAL_IMPULSE_VIRTUAL_ENV/bin
|
x ls -l $ILLOGICAL_IMPULSE_VIRTUAL_ENV/bin/gradience-cli
|
||||||
d ls -l ~/.local/share/glib-2.0
|
x ls $XDG_DATA_HOME/glib-2.0/schemas
|
||||||
d ls -l ~/.local/share/gradience
|
x ls $XDG_DATA_HOME/gradience
|
||||||
|
x cat ~/.config/ags/
|
||||||
|
|
||||||
e "Checking command existence"
|
e "Checking command existence"
|
||||||
d command -v pacman
|
commands=(pacman zypper apt dnf yum Hyprland)
|
||||||
|
for i in "${commands[@]}";do x command -v $i;done
|
||||||
|
|
||||||
|
e "Checking versions"
|
||||||
|
x Hyprland --version
|
||||||
|
x ags --version
|
||||||
|
|
||||||
#e "Checking Color Generators"
|
#e "Checking Color Generators"
|
||||||
#d ~/.config/ags/scripts/color_generation/applycolor.sh
|
#x ~/.config/ags/scripts/color_generation/applycolor.sh
|
||||||
|
|
||||||
|
e "Finished. Output saved as \"dianose.log\"."
|
||||||
|
|||||||
Reference in New Issue
Block a user