update
This commit is contained in:
@@ -1,13 +1,45 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
## INSTALL
|
## INIT
|
||||||
#termux-setup-storage
|
#mkdir -p ~/bin
|
||||||
#pkg update
|
#wget https://gitea.140477.xyz/pierrick/termux_url_opener/raw/branch/main/termux-url-opener -P ~/bin
|
||||||
#pkg upgrade
|
|
||||||
#pkg install python3 ffmpeg wget
|
|
||||||
pip install --upgrade yt-dlp
|
|
||||||
#mkdir ~/bin
|
|
||||||
#wget https://...............termux-url-opener -P ~/bin
|
|
||||||
#chmod +x ~/bin/termux-url-opener
|
#chmod +x ~/bin/termux-url-opener
|
||||||
|
|
||||||
yt-dlp -f "bestvideo[height<=360]+bestaudio/best" $1
|
|
||||||
|
# Fonction pour l'installation
|
||||||
|
install() {
|
||||||
|
echo "Lancement de l'installation..."
|
||||||
|
termux-setup-storage
|
||||||
|
pkg update
|
||||||
|
pkg upgrade
|
||||||
|
pkg install python3 ffmpeg wget
|
||||||
|
pip install yt-dlp
|
||||||
|
}
|
||||||
|
|
||||||
|
# Fonction pour la mise à jour
|
||||||
|
update() {
|
||||||
|
echo "Lancement de la mise à jour..."
|
||||||
|
pip install --upgrade yt-dlp
|
||||||
|
}
|
||||||
|
|
||||||
|
# Analyse des options avec getopts
|
||||||
|
while getopts "iu" option; do
|
||||||
|
case $option in
|
||||||
|
i)
|
||||||
|
install
|
||||||
|
update
|
||||||
|
exit 0
|
||||||
|
;;
|
||||||
|
u)
|
||||||
|
update
|
||||||
|
exit 0
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
echo "Option invalide. Usage: $0 [-i | -u]"
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
|
||||||
|
# Exécution par défaut si aucune option n'est fournie
|
||||||
|
yt-dlp -f "bestvideo[height<=360]+bestaudio/best" "$1"
|
||||||
|
|||||||
Reference in New Issue
Block a user