optimizations and code cleanup

This commit is contained in:
CoolnsX
2022-02-10 20:37:18 +05:30
parent 12b79c4682
commit a6a5a6a764
3 changed files with 8 additions and 13 deletions

View File

@@ -28,11 +28,9 @@ part_tor(){
}
trap "rm -f $HOME/.cache/*.torrent;exit 0" INT HUP
file=$HOME/.cache/maglink
xclip -out clipboard > $file
if [ -f "$file" ]; then
magnet=$(cat $file)
if [ -z "$*" ]; then
magnet=$(xclip -out clipboard)
else
magnet=$*
fi