From 5e466abb6ef19e8be2674d67b94e43ccfbfce33f Mon Sep 17 00:00:00 2001 From: Raymaekers Luca Date: Sat, 29 Jul 2023 11:48:57 +0200 Subject: added toush --- bin/common/toush | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100755 bin/common/toush (limited to 'bin/common') diff --git a/bin/common/toush b/bin/common/toush new file mode 100755 index 0000000..dd675b9 --- /dev/null +++ b/bin/common/toush @@ -0,0 +1,14 @@ +#!/bin/sh +# fork of +# https://codeberg.org/futxlii/bin/toush :) + +shebang='#!/bin/sh' + +usage() { >&2 printf 'Usage: %s' "${0##*/}"; exit 1 ;} + +[ "$1" ] || usage +while [ "$1" ]; do + [ -f "$1" ] && usage + printf '%s\n\n' "$shebang" > "$1" && chmod +x "$1" + shift +done -- cgit v1.2.3