tool(autocommit): simplify to one parameter Remove COMMIT_MESSAGE from usage text--that was always a lie.
shwarp
Sun, 30 Aug 2026 13:47:55 -0400
1 files changed,
4 insertions(+),
4 deletions(-)
jump to
M
tools/autocommit
→
tools/autocommit
@@ -1,8 +1,8 @@
#!/bin/bash -if [[ $# -ne 2 ]] +if [[ $# -ne 1 ]] then - echo "Usage: ./autocommit <DIR> <FILE> [COMMIT_MESSAGE]" + echo "Usage: ./autocommit <FILE_PATH>" exit 1 fi@@ -12,8 +12,8 @@ echo "This script requires 'inotify-tools'"
exit 1 fi -DIRECTORY="$1" -FILE="$2" +FILE=$(basename "$1") +DIRECTORY=$(echo ${1::-"$((${#FILE} + 1))"}) COMMIT_MESSAGE="auto: $FILE changed" while true