hppt
hppt copied to clipboard
eq should be -eq in archive_wal
diff --git a/rep/archive_wal b/rep/archive_wal
index 8e98b38..12f0219 100755
--- a/rep/archive_wal
+++ b/rep/archive_wal
@@ -158,7 +158,7 @@ fi
# 16MB WAL files have no "." in their name at all.
DOTPOS=`expr index "$2" "."`
-if [ $DOTPOS eq 0 ] ; then
+if [ $DOTPOS -eq 0 ] ; then
# No dot in the file, must be a regular WAL file.
# Sanity check on file size, to never copy a partial WAL file
FILESIZE=$(du -b "$1" | cut -f 1)
After trying to fix this as suggested, I discovered "expr index" only works on systems with GNU coreutils. OS X for example gives an error. I want to get a more robust fix for this before committing a change that might break some working installations of archive_wal.