Re: pg_upgrade test mods for Windows/Mingw
От | Gurjeet Singh |
---|---|
Тема | Re: pg_upgrade test mods for Windows/Mingw |
Дата | |
Msg-id | CABwTF4WmybGqq3c3H3y9NDuuXHKSN9hYWuAUNAHBpiptNCCMSA@mail.gmail.com обсуждение исходный текст |
Ответ на | pg_upgrade test mods for Windows/Mingw (Andrew Dunstan <andrew@dunslane.net>) |
Ответы |
Re: pg_upgrade test mods for Windows/Mingw
Re: pg_upgrade test mods for Windows/Mingw |
Список | pgsql-hackers |
On Sun, Sep 2, 2012 at 11:29 PM, Andrew Dunstan <andrew@dunslane.net> wrote:
When reading shell script code like this
`uname -a | sed 's/.* //'` = Msys
and
sed -i -e 's,/,\\,g' -e 's,\\s\\q ,/s/q ,' delete_old_cluster.bat 2>/dev/null
I find it easier to understand and maintain if the comments also describe what is the original string format that this pattern-matching expects, like:
# We expect `uname -a` output like:
# Windows_NT4.0 Msys
and
# We expect lines of the format:
# abc/xyz/def/
# and we convert them to
# abc\xyz\def
BTW, would `uname -o` eliminate the need of pattern matching in the first snippet? The Wikipedia [1] article suggests so.The attached patch is what I had to do to get pg_upgrade's "make check" to run on Windows under Mingw. Mostly the changes have to do with getting paths right between Windows and MSys, or calling generated .bat files instead of shell scripts.
When reading shell script code like this
`uname -a | sed 's/.* //'` = Msys
and
sed -i -e 's,/,\\,g' -e 's,\\s\\q ,/s/q ,' delete_old_cluster.bat 2>/dev/null
I find it easier to understand and maintain if the comments also describe what is the original string format that this pattern-matching expects, like:
# We expect `uname -a` output like:
# Windows_NT4.0 Msys
and
# We expect lines of the format:
# abc/xyz/def/
# and we convert them to
# abc\xyz\def
[1] http://en.wikipedia.org/wiki/Uname
Best regards,
--
Gurjeet Singh
В списке pgsql-hackers по дате отправления: