mirror of
https://github.com/CoolnsX/repos_scripts.git
synced 2025-12-20 07:15:20 +05:30
feat : made scripts universal and much more complicated
This commit is contained in:
13
torrent
13
torrent
@@ -8,10 +8,19 @@ c_reset="\033[0m"
|
||||
|
||||
down(){
|
||||
tput reset
|
||||
notify-send "Torrent: Downloading"
|
||||
aria2c -d Downloads --select-file=$2 --seed-time=0 $1 && notify-send "Torrent: Download complete" && rm -f $file || notify-send -u critical "Torrent: Error!!"
|
||||
info_$os "Torrent: Downloading"
|
||||
aria2c -d Downloads --select-file=$2 --seed-time=0 $1 && info_$os "Torrent: Download complete" && rm -f $file || error_$os "Torrent: Error!!"
|
||||
}
|
||||
|
||||
if [ "$(uname -o)" = "Android" ]; then
|
||||
os="droid"
|
||||
script_dir="$HOME"
|
||||
else
|
||||
os="linux"
|
||||
script_dir="$HOME/repos_scripts"
|
||||
fi
|
||||
|
||||
. $script_dir/.functions
|
||||
trap "rm -f $HOME/.cache/*.torrent;exit 0" INT HUP
|
||||
[ -z "$*" ] && magnet="$(wl-paste)" || magnet="$*"
|
||||
echo "$magnet"
|
||||
|
||||
Reference in New Issue
Block a user