Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- # Script Function
- url () {
- printf '\033[033mURL: \033[m'
- echo $*
- }
- #//+ ITS_ function to easily check the,
- #// operating systems presense of any needed package.
- #/#/ Define any tools needed here seperated only by a "\:space:"\
- needed_tool=' youtube-dl aria2c '
- #//* Begin System Tool Search
- require_tools ()
- {
- local NOT_AVAIL=""
- for TOOL in $needed_tool; do
- if [ "`which $TOOL 2> /dev/null`" == "" ]; then NOT_AVAIL="$NOT_AVAIL $TOOL"; fi
- done
- if [[ "$NOT_AVAIL" != "" ]]; then
- echo "ERROR: The following required tool(s) cannot be found: $NOT_AVAIL"
- exit 3
- fi
- }
- # Check file system tools before we start
- require_tools
- # Script Variables
- FILE=`echo "youtube-dl -c -i --yes-playlist --ignore-config --external-downloader aria2c"`
- FILE_1=`echo $FILE > /tmp/termdl`
- FILE_DL=`cat /tmp/termdl`
- # Start
- # echo -e "Copy Paste Videos/URL:"
- url
- read URL
- $FILE_DL "$URL"
- # Finish and exit
- exit
Add Comment
Please, Sign In to add comment