Enable ShellCheck and improve shell scripts

This commit is contained in:
SebastianStork 2025-09-12 19:32:48 +02:00
parent 58a78d7de7
commit e5b6374751
7 changed files with 64 additions and 42 deletions

View file

@ -49,8 +49,6 @@ in
storage.hook =
let
createBirthdayCalendar = "${inputs.radicale-birthday-calendar}/create_birthday_calendar.py";
hookScript = pkgs.writeShellApplication {
name = "radicale-git-hook";
runtimeInputs = [
@ -64,9 +62,10 @@ in
))
];
text = ''
readonly username="$1"
username="$1"
create_birthday_calendar="${inputs.radicale-birthday-calendar}/create_birthday_calendar.py"
git status --porcelain | awk '{print $2}' | python3 ${createBirthdayCalendar}
git status --porcelain | awk '{print $2}' | python3 $create_birthday_calendar
git add -A
if ! git diff --cached --quiet; then