From 783f1adc7be2ae2339f4a075357cddfaf8c8fa0d Mon Sep 17 00:00:00 2001 From: Greenpete Date: Sun, 8 Jan 2023 20:45:10 +0000 Subject: [PATCH] Added menu shortcut. --- Backup.desktop | 7 +++++++ install.sh | 10 ++++++++-- 2 files changed, 15 insertions(+), 2 deletions(-) create mode 100644 Backup.desktop diff --git a/Backup.desktop b/Backup.desktop new file mode 100644 index 0000000..fc89c37 --- /dev/null +++ b/Backup.desktop @@ -0,0 +1,7 @@ +[Desktop Entry] +Name=Backup Home +Exec= +Comment=A script to back up your home dir +Terminal=true +Icon= +Type=Application \ No newline at end of file diff --git a/install.sh b/install.sh index f8bedea..0e1c550 100755 --- a/install.sh +++ b/install.sh @@ -18,7 +18,12 @@ if [ -d "$HOME"/bin ]; else mkdir "$HOME"/bin fi -~ Make the root dir... +# Edit the menu entry file... + +sed -i "s|Exec=|Exec=$HOME/bin/backup_home|" "$pwd"/Backup.desktop +sed -i "s|Icon=|Icon=$HOME/bin/backup_home|" "$pwd"/Backup.desktop + +# Make the root dir... mkdir "$HOME"/bin/backup_home # Copy files over to ~/bin @@ -27,8 +32,9 @@ cp "$pwd"/Backup.sh "$HOME"/bin/backup_home cp "$pwd"/Backup.svg "$HOME"/bin/backup_home cp "$pwd"/LICENSE "$HOME"/bin/backup_home cp "$pwd"/README.md "$HOME"/bin/backup_home +cp "$pwd"/Backup.desktop "$HOME"/.local/share/applications -# let the user know we have finished... +# Let the user know we have finished... echo "All done! Press 'Enter' to close this window..." read -r \ No newline at end of file