Support for running w/o installation

This commit is contained in:
Jaidyn Ann 2017-01-05 22:38:38 -06:00
parent cdb7481b55
commit f1416eda07
5 changed files with 56 additions and 0 deletions

View File

@ -17,6 +17,17 @@ else
results=21 results=21
fi 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 interactive_mode=0
channel_file="/tmp/$(mktemp -u yt-channel_XXXXXX)" channel_file="/tmp/$(mktemp -u yt-channel_XXXXXX)"

View File

@ -20,6 +20,18 @@ else
id=$1 id=$1
fi 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" if echo "$id" | grep "youtube.com"
then then
id="$(echo "$id" | sed 's/.*video_id=//')" id="$(echo "$id" | sed 's/.*video_id=//')"

View File

@ -20,6 +20,17 @@ else
id="$1" id="$1"
fi 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)" video_file="/tmp/$(mktemp -u yt-video_XXXXXX)"
if type "wget" &> /dev/null if type "wget" &> /dev/null

View File

@ -17,6 +17,17 @@ else
results=21 results=21
fi 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 row=0
if [ "$1" == "-i" ] if [ "$1" == "-i" ]

View File

@ -25,6 +25,17 @@ then
. "$HOME/.config/shelltube" . "$HOME/.config/shelltube"
fi 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() { search() {
output="$(mktemp -u /tmp/yt_XXXXXX)" output="$(mktemp -u /tmp/yt_XXXXXX)"
yt-search -i "$1" "$output" yt-search -i "$1" "$output"