cleaned up prep process
[feisty_meow.git] / scripts / core / functions.sh
index 30c36abd80bf96f0bdfb4f3f3b96f35d2704f97a..b39a9d3005986dc4357d956704515de201542e3a 100644 (file)
@@ -38,7 +38,7 @@ if [ -z "$skip_all" ]; then
   # happens.
   function whichable()
   {
-    to_find="$1"; shift
+    local to_find="$1"; shift
     local WHICHER="$(/usr/bin/which which 2>/dev/null)"
 #>&2 echo "got whicher as: $WHICHER"
     if [ $? -ne 0 ]; then
@@ -446,8 +446,12 @@ if [ -z "$skip_all" ]; then
   # returns a successful value (0) if this system is debian or ubuntu.
   function debian_like() {
     # decide if we think this is debian or ubuntu or a variant.
-    DEBIAN_LIKE=$(if [ ! -z "$(grep -i debian /etc/issue)" \
-        -o ! -z "$(grep -i ubuntu /etc/issue)" ]; then echo 1; else echo 0; fi)
+    DEBIAN_LIKE=$( \
+      if [ \
+        ! -z "$(grep -i debian /etc/issue)" -o \
+        ! -z "$(grep -i ubuntu /etc/issue)" -o \
+        ! -z "$(grep -i 'Pop._OS' /etc/issue)" \
+      ]; then echo 1; else echo 0; fi)
     if [ $DEBIAN_LIKE -eq 1 ]; then
       # success; this is debianish.
       return 0
@@ -975,7 +979,7 @@ return 0
 #hmmm: would the composition of those two types of extensions cover all the files i want to rename?  they have to be "important".
     find "${dirs[@]}" -follow -maxdepth 1 -mindepth 1 -type f -and -not -iname ".[a-zA-Z0-9]*" | \
         grep -i \
-"csv\|doc\|docx\|eml\|html\|ics\|jpeg\|jpg\|m4a\|mov\|mp3\|odp\|ods\|odt\|pdf\|png\|ppt\|pptx\|rtf\|txt\|vsd\|vsdx\|wav\|xls\|xlsx\|xml\|zip" | \
+"csv\|doc\|docx\|eml\|html\|ics\|jpeg\|jpg\|m4a\|mov\|mp3\|odp\|ods\|odt\|pdf\|png\|ppt\|pptx\|rtf\|txt\|vsd\|vsdx\|wav\|webp\|xls\|xlsx\|xml\|zip" | \
         sed -e 's/^/"/' | sed -e 's/$/"/' | \
         xargs bash "$FEISTY_MEOW_SCRIPTS/files/spacem.sh"
     # drop the temp file now that we're done.