[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Gnumed-devel] Sed is you friend - managing the passwords for the bo
From: |
Karsten Hilbert |
Subject: |
Re: [Gnumed-devel] Sed is you friend - managing the passwords for the boostrap process |
Date: |
Wed, 24 Mar 2010 14:38:05 +0100 |
User-agent: |
Mutt/1.5.20 (2009-06-14) |
On Wed, Mar 24, 2010 at 02:30:57PM +0100, Hilbert, Sebastian wrote:
> For MS Windows we have opted to preseed a set of passwords so users don't
> have
> to type all those passwords. That however involves changing a bunch of config
> files in the bootstrap directory. Doing that manually for every release was
> just out of the question. Sed comes to the rescue.
>
> echo off
>
> SET SED=C:\bin\sed.exe
> SET VER=12.2
> SET WORKINGDIR=C:\workplace\gnumed-server.%VER%\server\bootstrap
> SET GMDBOPWD=gm-dbpass
> SET PGPWD=postgrespassword
>
> cd %WORKINGDIR%
> echo # patching files in %WORKINGDIR%
> for %%f in (*.conf) do %SED% -i "s/password = /password = %GMDBOPWD%/g"
> %%f
> for %%f in (*.conf) do %SED% -i "s/#password =/password = %PGPWD%/g" %%f
> echo # clean up
> del sed*
>
> That is magic. No more messing around and screwing up.
Very nice. sed on Windows. Bliss !
Karsten
--
GPG key ID E4071346 @ wwwkeys.pgp.net
E167 67FD A291 2BEA 73BD 4537 78B9 A9F9 E407 1346