~ecs/dotfiles

ddbddbaf88e15d7119684f360bdeb2735a01b7f2 — Eyal Sawady 10 days ago 4880972
sendit, gimme: add usage

Also set -eu
2 files changed, 12 insertions(+), 2 deletions(-)

M bin/gimme
M bin/sendit
M bin/gimme => bin/gimme +6 -1
@@ 1,3 1,8 @@
#!/bin/sh
#!/bin/sh -eu

if [ $# -ne 0 ]; then
	echo "usage: cd /path/to/dest && gimme"
	exit 1
fi

busybox nc -vlkp 12345 -e sh -c 'zstd -d | pv | tar xv'

M bin/sendit => bin/sendit +6 -1
@@ 1,4 1,9 @@
#!/bin/sh
#!/bin/sh -eu

if [ $# -lt 2 ]; then
	echo "usage: sendit <host> <path>..."
	exit 1
fi

host="$1"
shift