From 90cb341c235ff2b007802abd10ac09d944285311 Mon Sep 17 00:00:00 2001 From: Joe Date: Thu, 20 Jun 2024 21:00:56 +0200 Subject: up --- .local/bin/linkview | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) (limited to '.local') diff --git a/.local/bin/linkview b/.local/bin/linkview index 121afad..8874f08 100755 --- a/.local/bin/linkview +++ b/.local/bin/linkview @@ -182,7 +182,7 @@ sub open_link while (1) { $val = `tail -n 1 "$tmpfile" | awk '{print \$2}' | tr -d '%'`; if (looks_like_number($val) != 0) { - system( + system( NOTIFYSEND_PATH, '-h', 'int:value:' . $val, @@ -238,13 +238,10 @@ sub open_link ' ' . $file_name . ' started downloading' ); (undef, undef, $ret) = capture { - given (HOSTNAME) { - when(["mother", "po-rbo"]) { - system(CURL_PATH, "-fsSLO", $url); - } - when("mars") { - system(FETCH_PATH, $url); - } + if (HOSTNAME eq "mother" or "po-rbo") { + system(CURL_PATH, "-fsSLO", $url); + } elsif (HOSTNAME == "mars") { + system(FETCH_PATH, $url); } }; if ($ret == 0) { -- cgit v1.2.3