From 1ed954976c170885d0fb95b5e4aabeb192720366 Mon Sep 17 00:00:00 2001 From: Mike Small Date: Sun, 27 Sep 2020 14:42:46 -0400 Subject: [PATCH] getviaphone: download using phone --- Makefile | 2 ++ getviaphone | 7 +++++++ 2 files changed, 9 insertions(+) create mode 100644 getviaphone diff --git a/Makefile b/Makefile index e141e82..b0af855 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,9 @@ check: perl -wc frfac perlcritic frfac + ksh93 -n getviaphone install: sudo install -o root -g wheel -m 0755 -d /usr/local/bin sudo install -o root -g wheel -m 0555 frfac /usr/local/bin + sudo install -o root -g wheel -m 0555 getviaphone /usr/local/bin diff --git a/getviaphone b/getviaphone new file mode 100644 index 0000000..35d791b --- /dev/null +++ b/getviaphone @@ -0,0 +1,7 @@ +#!/bin/sh +# Download a file via the phone. + +u=$1 +f=${u%%\?*} +f=${f##*/} +ssh phone "cd downloads/tmp;wget -O- $u" > $f