-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinstall.sh
28 lines (22 loc) · 894 Bytes
/
install.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#!/bin/bash
# Set variables
APP_NAME="PermanentDelete"
BINARY_NAME="permanentdelete"
DESKTOP_FILE_NAME="delete_permanently.desktop"
DESKTOP_FILE_DESTINATION="/usr/share/kio/servicemenus"
DESKTOP_FILE_LOCATION="$DESKTOP_FILE_DESTINATION/$DESKTOP_FILE_NAME"
BIN_LOCATION="/usr/bin"
# Move the binary to the system's binary files location
sudo cp $BINARY_NAME $BIN_LOCATION
# Create the .desktop file
echo "[Desktop Entry]
Type=Service
ServiceTypes=KonqPopupMenu/Plugin
MimeType=application/octet-stream;
Actions=delete_permanently;
[Desktop Action delete_permanently]
Name=Delete Permanently
Icon=edit-delete
Exec=/usr/bin/permanentdelete %U" > $DESKTOP_FILE_NAME
sudo mv $DESKTOP_FILE_NAME $DESKTOP_FILE_DESTINATION
echo "Installation complete. You can now use the 'Delete Permanently' option from the right-click context menu. If it doesn't show up try logging out ang logging in again."