Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

eq should be -eq in archive_wal #1

Open
gkwrcc opened this issue Oct 24, 2013 · 1 comment
Open

eq should be -eq in archive_wal #1

gkwrcc opened this issue Oct 24, 2013 · 1 comment

Comments

@gkwrcc
Copy link

gkwrcc commented Oct 24, 2013

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)
@gregs1104
Copy link
Owner

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants