Make sed edit desktop shortcut in final place, rather than before copying.
Bumped the version.
This commit is contained in:
parent
29c8f64f10
commit
3932a22837
7
YT-DL.sh
7
YT-DL.sh
|
@ -8,7 +8,7 @@
|
|||
# It also checks that ytdl is installed #
|
||||
# and up to date! #
|
||||
# By Peter Green #
|
||||
# Version 0.9.2 #
|
||||
# Version 0.9.3 (Remember to change below!) #
|
||||
# Date of first version; 2022-04-04 #
|
||||
# Date of last update; 2023-01-08 #
|
||||
# Moved to the Disroot Gitea instance 2022-01-07 #
|
||||
|
@ -17,6 +17,9 @@
|
|||
|
||||
# Config...
|
||||
|
||||
# Version...
|
||||
version=0.9.3
|
||||
|
||||
# How many times should this script run before it checks for updates?
|
||||
ud_frq=11 # This means the script will run on the number after that which you set here. The counter starts at 0.
|
||||
|
||||
|
@ -28,7 +31,7 @@ echo "
|
|||
#############################################################
|
||||
# #
|
||||
# Welcome to the Peter's YouTube video downloader! #
|
||||
# Version 0.9.2 #
|
||||
# Version $version #
|
||||
# #
|
||||
#############################################################"
|
||||
|
||||
|
|
|
@ -1 +1 @@
|
|||
0
|
||||
0
|
||||
|
|
18
install.sh
18
install.sh
|
@ -1,5 +1,5 @@
|
|||
#!/bin/bash
|
||||
|
||||
set -ex
|
||||
# This file should be executable
|
||||
|
||||
# Determine where we are...
|
||||
|
@ -13,12 +13,6 @@ if [ -f /usr/local/bin/youtube-dl ]
|
|||
else echo "youtube-dl is not present - installing..." && sudo curl -L https://yt-dl.org/downloads/latest/youtube-dl -o /usr/local/bin/youtube-dl && sudo chmod a+rx /usr/local/bin/youtube-dl && echo "1" > ./dbytdl.txt
|
||||
fi
|
||||
|
||||
# Edit desktop menu file.
|
||||
# First the Execution path...
|
||||
sed -i "s|Exec=/path/|Exec=$HOME/bin/YT-DL/YT-DL.sh|" "$pwd"/menu.desktop
|
||||
# Now icon path...
|
||||
sed -i "s|Icon=/path/|Icon=$HOME/bin/YT-DL/YouTube-DL.svg|" "$pwd"/menu.desktop
|
||||
|
||||
# Check for needed directories...
|
||||
if [ -d ~/bin ];
|
||||
then echo >/dev/null
|
||||
|
@ -32,8 +26,8 @@ fi
|
|||
|
||||
# copy over the files...
|
||||
cp db.txt ~/bin/YT-DL
|
||||
cp dbpyer.txt ~/bin/YT-DL/db.txt
|
||||
cp dbytdl.txt ~/bin/YT-DL/
|
||||
cp dbpyer.txt ~/bin/YT-DL
|
||||
cp dbytdl.txt ~/bin/YT-DL
|
||||
cp YouTube-DL.svg ~/bin/YT-DL
|
||||
cp YT-DL.sh ~/bin/YT-DL
|
||||
cp LICENSE ~/bin/YT-DL
|
||||
|
@ -42,6 +36,12 @@ cp menu.desktop ~/.local/share/applications
|
|||
cp uninstall.sh ~/bin/YT-DL
|
||||
cp python-error.sh ~/bin/YT-DL
|
||||
|
||||
# Edit desktop menu file.
|
||||
# First the Execution path...
|
||||
sed -i "s|Exec=/path/|Exec=$HOME/bin/YT-DL/YT-DL.sh|" "$HOME"/.local/share/applications/menu.desktop
|
||||
# Now icon path...
|
||||
sed -i "s|Icon=/path/|Icon=$HOME/bin/YT-DL/YouTube-DL.svg|" "$HOME"/.local/share/applications/menu.desktop
|
||||
|
||||
# Check for the python symlink...
|
||||
if [ -f /usr/bin/python ];
|
||||
then echo >/dev/null
|
||||
|
|
Loading…
Reference in New Issue