gnumed-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gnumed-devel] Sed is you friend - managing the passwords for the boostr


From: Sebastian Hilbert
Subject: [Gnumed-devel] Sed is you friend - managing the passwords for the boostrap process
Date: Wed, 24 Mar 2010 14:30:57 +0100
User-agent: KMail/1.13.1 (Linux/2.6.31.12-0.2-default; KDE/4.4.1; i686; ; )

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.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]