new_scriptest

This commit is contained in:
Simon Rieger 2017-07-08 12:30:31 +00:00
parent 99686c16cb
commit cf64ffd546
2 changed files with 19 additions and 2 deletions

9
tsu-extra.sh Normal file
View file

@ -0,0 +1,9 @@
set -ex
HOME=/storage/emulated/0
PREFIX=/data/data/com.termux/files/usr
ROOT_HOME=$HOME/.suroot
ROOT_SHELL=$PREFIX/bin/bash
mkdir -p $HOME/.suroot
su --preserve-environment -c "LD_LIBRARY_PATH=$PREFIX/lib HOME=$ROOT_HOME $ROOT_SHELL"

12
youtube-dl-android.sh Executable file → Normal file
View file

@ -1,6 +1,10 @@
#!/system/xbin/bash
set -ex
read -p "Wie ist die URL? : " url
read -p "Wo sollen die Dateien heruntergeladen werden? : " pfad
read -p "Soll ein Video heruntergeladen werden oder Audio? [opus/audio/video/BEST] : " format
read -p "Soll ein Video heruntergeladen werden oder Audio? [opus/audio/video/BEST/60k] : " format
if [ "$format" == "opus" ]
then
@ -11,12 +15,16 @@ then
elif [ "$format" == "video" ]
then
format="-f 43"
elif [ "$format" == "60k" ]
then
format="-f 303+251"
fi
mkdir -p $pfad
cd $pfad
/data/data/com.termux/files/usr/bin/python /data/data/com.termux/files/usr/bin/youtube-dl --ffmpeg-location /data/data/com.termux/files/usr/bin/ffmpeg -i $format $url
pwd
/data/data/com.termux/files/usr/bin/python /data/data/com.termux/files/usr/bin/youtube-dl --ffmpeg-location /data/data/com.termux/files/usr/bin/ffmpeg -i --socket-timeout 10000 $format $url
# ROOT_SHELL="$PREFIX/bin/bash"