diff --git a/YT-DL.sh b/YT-DL.sh index 0c6a539..43bbce2 100755 --- a/YT-DL.sh +++ b/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 # # # #############################################################" diff --git a/dbytdl.txt b/dbytdl.txt index c227083..573541a 100644 --- a/dbytdl.txt +++ b/dbytdl.txt @@ -1 +1 @@ -0 \ No newline at end of file +0 diff --git a/install.sh b/install.sh index 1912a11..f411138 100755 --- a/install.sh +++ b/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