mirror of
https://github.com/byReqz/blackmate.git
synced 2024-11-23 11:44:56 +00:00
Update blackmate.sh
- Fix improper display of the category icons when xfce4 rely on the file icons.cache - Fix tools with the characters '-' that doesn't get display in the menu - Only the installed tools will now be displayed - Removed the chown $user (not needed)
This commit is contained in:
parent
1c7341ae41
commit
dc03b17c25
23
blackmate.sh
23
blackmate.sh
@ -1,6 +1,6 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
#
|
#
|
||||||
# Blackmate v0.42
|
# Blackmate v0.43
|
||||||
#
|
#
|
||||||
# Description : BlackMate is a menu generator for the BlackArch Linux os tools, made for the wm xfce4.
|
# Description : BlackMate is a menu generator for the BlackArch Linux os tools, made for the wm xfce4.
|
||||||
# It will fetch the latest database of BlackArch and create an entry for each of them in the menu.
|
# It will fetch the latest database of BlackArch and create an entry for each of them in the menu.
|
||||||
@ -29,6 +29,7 @@
|
|||||||
No ) break;;
|
No ) break;;
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo -e "\033[32m[*]\e[0m Creating the new menu entry";
|
echo -e "\033[32m[*]\e[0m Creating the new menu entry";
|
||||||
@ -68,8 +69,7 @@
|
|||||||
#Copy the extra icons into the icons theme
|
#Copy the extra icons into the icons theme
|
||||||
cp /usr/share/blackmate/menu-i/* /usr/share/icons/$thic/32x32/apps/ 2> /dev/null || true
|
cp /usr/share/blackmate/menu-i/* /usr/share/icons/$thic/32x32/apps/ 2> /dev/null || true
|
||||||
|
|
||||||
#Set the proper chown and chmod
|
#Set the correct chmod
|
||||||
chown $SUDO_USER:$SUDO_USER /usr/share/icons/$thic/32x32/apps/ -R 2> /dev/null || true
|
|
||||||
chmod 755 /usr/share/icons/$thic/32x32/apps/ -R 2> /dev/null || true
|
chmod 755 /usr/share/icons/$thic/32x32/apps/ -R 2> /dev/null || true
|
||||||
|
|
||||||
#Download and generate the latest tools list
|
#Download and generate the latest tools list
|
||||||
@ -100,12 +100,15 @@
|
|||||||
|
|
||||||
#Check the group of the current tool, if empty, go to the next iteration
|
#Check the group of the current tool, if empty, go to the next iteration
|
||||||
if [[ -z "$subc" ]]; then
|
if [[ -z "$subc" ]]; then
|
||||||
continue 1;
|
continue;
|
||||||
fi
|
fi
|
||||||
|
|
||||||
#Name of the tool
|
#Name of the tool
|
||||||
tname=`cat /usr/share/blackmate/tmp/$u/desc | sed 's/blackarch//' |
|
tname=`cat /usr/share/blackmate/tmp/$u/desc | sed 's/blackarch//' |
|
||||||
sed '/^\s*$/d' | sed -n '/%NAME%/{n;p}' | cut -d "-" -f 2`;
|
sed '/^\s*$/d' | sed -n '/%NAME%/{n;p}'`;
|
||||||
|
|
||||||
|
#Check if the tool is installed on the system, otherwise skip to the next
|
||||||
|
command -v $tname >/dev/null 2>&1 || { continue; }
|
||||||
|
|
||||||
#Set categorie of the subcategorie tool branche
|
#Set categorie of the subcategorie tool branche
|
||||||
if [[ $subc == "code-audit" ]] || [[ $subc == 'decompiler' ]] ||
|
if [[ $subc == "code-audit" ]] || [[ $subc == 'decompiler' ]] ||
|
||||||
@ -217,11 +220,13 @@
|
|||||||
echo -e "\033[32m[*]\e[0m Cleanup...";
|
echo -e "\033[32m[*]\e[0m Cleanup...";
|
||||||
|
|
||||||
#Move the .desktop to the right directory
|
#Move the .desktop to the right directory
|
||||||
mv /usr/share/blackmate/ba-*.desktop /usr/share/applications
|
mv /usr/share/blackmate/ba-*.desktop /usr/share/applications 2> /dev/null || true
|
||||||
|
|
||||||
#Delete tmp directory
|
#Delete tmp directory
|
||||||
rm -rf /usr/share/blackmate/tmp/
|
rm -rf /usr/share/blackmate/tmp/ 2> /dev/null || true
|
||||||
rm /usr/share/blackmate/blackarch.db.tar.gz
|
rm /usr/share/blackmate/blackarch.db.tar.gz 2> /dev/null || true
|
||||||
|
|
||||||
|
#Delete any cache icons of the current theme
|
||||||
|
rm /usr/share/icons/Adwaita/icon-theme.cache 2> /dev/null || true
|
||||||
|
|
||||||
echo -e "\033[32m[*]\e[0m Done, in order to have a correct display of the new menu, you may need to restart xfce4";
|
echo -e "\033[32m[*]\e[0m Done, in order to have a correct display of the new menu, you may need to restart xfce4";
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user