Use temporary file

This commit is contained in:
Justin Ethier 2024-01-11 19:57:54 -08:00
parent 756e5c1b72
commit 436a6560cd

View file

@ -1,11 +1,12 @@
#!/bin/bash
FORMAT_CMD="indent -linux -l80 -i2 -nut"
echo $1
FILE=$1
TMP=$(mktemp)
$FORMAT_CMD $1 -o $1.format-test
$FORMAT_CMD $FILE -o $TMP
diff $1 $1.format-test > /dev/null
diff $FILE $TMP > /dev/null
#ret=$?
#
#if [[ $ret -eq 0 ]]; then