tools -> scripts

This commit is contained in:
2025-11-14 10:44:57 +08:00
parent 0493f18b18
commit c7449f4acb
70 changed files with 369 additions and 2 deletions

23
scripts/utils/mksh Executable file
View File

@@ -0,0 +1,23 @@
#!/usr/bin/env bash
set -e
set -u
set -o pipefail
if [ ! $# -eq 1 ]; then
echo 'mksh takes one argument' 1>&2
exit 1
elif [ -e "$1" ]; then
echo "$1 already exists" 1>&2
exit 1
fi
echo '#!/usr/bin/env bash
set -e
set -u
set -o pipefail
' > "$1"
chmod u+x "$1"
"$EDITOR" "$1"