]> glassweightruler.freedombox.rocks Git - xdg-ninja.git/blobdiff - xdg-ninja.sh
xdg-ninja: remove unused variables
[xdg-ninja.git] / xdg-ninja.sh
index 00fd69efeb51dedbdb227fad663dd58dbe3407c3..4a53226e6ec1439ff02044f4ba2fa74050ab6658 100755 (executable)
@@ -4,6 +4,8 @@ USE_GLOW=true
 if ! command -v glow &> /dev/null
 then
     echo "Glow not found, markdown rendering not available."
+    echo "Output will be raw markdown and might look weird."
+    echo "Install glow for easier reading & copy-paste."
     USE_GLOW=false
 fi
 
@@ -42,11 +44,11 @@ for i in "$@" ; do
     fi
 done
 
-ERR=0
-WARN=1
-INFO=2
-SUCS=3
-HELP=4
+if ! command -v jq &> /dev/null
+then
+    echo "jq is needed to run this script, but it wasn't found. Please install it to be able to use this script."
+    exit
+fi
 
 # Function to expand enviornment variables in string
 # https://stackoverflow.com/a/20316582/11110290
@@ -156,9 +158,15 @@ check_program() {
 
 # Loops over all files in the programs/ directory and calls check_program
 enumerate_programs() {
+    echo -e "\e[1;3mStarting to check your \e[1;36m\$HOME.\e[1;0m"
+    echo -e ""
     for prog_filename in ./programs/*; do
         check_program "$(cat $prog_filename)"
     done
+    echo -e "\e[1;3mDone checking your \e[1;36m\$HOME.\e[1;0m"
+    echo -e ""
+    echo -e "\e[3mIf you have files in your \e[1;36m\$HOME\e[1;0m that shouldn't be there, but weren't recognised by xdg-ninja, please consider creating a configuration file for it and opening a pull request on github.\e[1;0m"
+    echo -e ""
 }
 
 enumerate_programs