mox/gents.sh
Mechiel Lukkien 67300969c1
don't use bash if not needed
from mteege
2024-02-11 21:46:45 +01:00

11 lines
359 B
Bash
Executable file

#!/bin/sh
set -eu
# generate new typescript client, only install it when it is different, so we
# don't trigger frontend builds needlessly.
go run vendor/github.com/mjl-/sherpats/cmd/sherpats/main.go -bytes-to-string -slices-nullable -maps-nullable -nullable-optional -namespace api api <$1 >$2.tmp
if cmp -s $2 $2.tmp; then
rm $2.tmp
else
mv $2.tmp $2
fi