diff options
author | Raymaekers Luca <raymaekers.luca@gmail.com> | 2023-08-02 15:19:25 +0200 |
---|---|---|
committer | Raymaekers Luca <raymaekers.luca@gmail.com> | 2023-08-02 15:19:25 +0200 |
commit | 9b791ac8786eed2d242d0909dd2379f008952042 (patch) | |
tree | 403c08eb322e18d045606822911a7eb6036f0070 /bin/common/toush | |
parent | e614a330978ce7e7f6d130cc7d199150e16a409d (diff) | |
parent | 63c64f071ecd45cf66ab49d199a634cd8db27056 (diff) |
Merge branch 'main' of db:dotfiles
Diffstat (limited to 'bin/common/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 |