summaryrefslogtreecommitdiffstats
path: root/.local/bin/linkview
diff options
context:
space:
mode:
Diffstat (limited to '.local/bin/linkview')
-rwxr-xr-x.local/bin/linkview13
1 files changed, 5 insertions, 8 deletions
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
' <b>' . $file_name . '</b> 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) {