diff options
author | Raymaekers Luca <raymaekers.luca@gmail.com> | 2023-07-29 11:48:57 +0200 |
---|---|---|
committer | Raymaekers Luca <raymaekers.luca@gmail.com> | 2023-07-29 11:48:57 +0200 |
commit | 5e466abb6ef19e8be2674d67b94e43ccfbfce33f (patch) | |
tree | 190c083d647e060f6a4f4c7946920b4c179ba5cf | |
parent | 55378ac493716f15fd68d73fb77fcade4a667d99 (diff) |
added toush
-rwxr-xr-x | bin/common/toush | 14 |
1 files changed, 14 insertions, 0 deletions
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 |