Support for running w/o installation
This commit is contained in:
parent
cdb7481b55
commit
f1416eda07
|
@ -17,6 +17,17 @@ else
|
|||
results=21
|
||||
fi
|
||||
|
||||
if [ -e "./lib/yt-meta" ]
|
||||
then
|
||||
alias yt-channel="./lib/yt-channel"
|
||||
alias yt-search="./lib/yt-down"
|
||||
alias yt-meta="./lib/yt-meta"
|
||||
alias yt-search="./lib/yt-search"
|
||||
alias yt-down="./lib/yt-channel"
|
||||
alias st-download="./lib/st-download"
|
||||
alias st-video="./lib/st-video"
|
||||
fi
|
||||
|
||||
interactive_mode=0
|
||||
channel_file="/tmp/$(mktemp -u yt-channel_XXXXXX)"
|
||||
|
||||
|
|
12
lib/yt-down
12
lib/yt-down
|
@ -20,6 +20,18 @@ else
|
|||
id=$1
|
||||
fi
|
||||
|
||||
if [ -e "./lib/yt-meta" ]
|
||||
then
|
||||
alias yt-channel="./lib/yt-channel"
|
||||
alias yt-search="./lib/yt-down"
|
||||
alias yt-meta="./lib/yt-meta"
|
||||
alias yt-search="./lib/yt-search"
|
||||
alias yt-down="./lib/yt-channel"
|
||||
alias st-download="./lib/st-download"
|
||||
alias st-video="./lib/st-video"
|
||||
fi
|
||||
|
||||
|
||||
if echo "$id" | grep "youtube.com"
|
||||
then
|
||||
id="$(echo "$id" | sed 's/.*video_id=//')"
|
||||
|
|
11
lib/yt-meta
11
lib/yt-meta
|
@ -20,6 +20,17 @@ else
|
|||
id="$1"
|
||||
fi
|
||||
|
||||
if [ -e "./lib/yt-meta" ]
|
||||
then
|
||||
alias yt-channel="./lib/yt-channel"
|
||||
alias yt-search="./lib/yt-down"
|
||||
alias yt-meta="./lib/yt-meta"
|
||||
alias yt-search="./lib/yt-search"
|
||||
alias yt-down="./lib/yt-channel"
|
||||
alias st-download="./lib/st-download"
|
||||
alias st-video="./lib/st-video"
|
||||
fi
|
||||
|
||||
|
||||
video_file="/tmp/$(mktemp -u yt-video_XXXXXX)"
|
||||
if type "wget" &> /dev/null
|
||||
|
|
|
@ -17,6 +17,17 @@ else
|
|||
results=21
|
||||
fi
|
||||
|
||||
if [ -e "./lib/yt-meta" ]
|
||||
then
|
||||
alias yt-channel="./lib/yt-channel"
|
||||
alias yt-search="./lib/yt-down"
|
||||
alias yt-meta="./lib/yt-meta"
|
||||
alias yt-search="./lib/yt-search"
|
||||
alias yt-down="./lib/yt-channel"
|
||||
alias st-download="./lib/st-download"
|
||||
alias st-video="./lib/st-video"
|
||||
fi
|
||||
|
||||
row=0
|
||||
|
||||
if [ "$1" == "-i" ]
|
||||
|
|
11
shelltube
11
shelltube
|
@ -25,6 +25,17 @@ then
|
|||
. "$HOME/.config/shelltube"
|
||||
fi
|
||||
|
||||
if [ -e "./lib/yt-meta" ]
|
||||
then
|
||||
alias yt-channel="./lib/yt-channel"
|
||||
alias yt-search="./lib/yt-down"
|
||||
alias yt-meta="./lib/yt-meta"
|
||||
alias yt-search="./lib/yt-search"
|
||||
alias yt-down="./lib/yt-channel"
|
||||
alias st-download="./lib/st-download"
|
||||
alias st-video="./lib/st-video"
|
||||
fi
|
||||
|
||||
search() {
|
||||
output="$(mktemp -u /tmp/yt_XXXXXX)"
|
||||
yt-search -i "$1" "$output"
|
||||
|
|
Reference in New Issue