summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorRaymaekers Luca <raymaekers.luca@gmail.com>2023-07-29 11:48:57 +0200
committerRaymaekers Luca <raymaekers.luca@gmail.com>2023-07-29 11:48:57 +0200
commit5e466abb6ef19e8be2674d67b94e43ccfbfce33f (patch)
tree190c083d647e060f6a4f4c7946920b4c179ba5cf /bin
parent55378ac493716f15fd68d73fb77fcade4a667d99 (diff)
added toush
Diffstat (limited to 'bin')
-rwxr-xr-xbin/common/toush14
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