On Tue, Apr 21, 2015 at 4:33 PM, Asif Naeem <anaeem...@gmail.com> wrote:

> The v2 patch looks good to me, just a minor concern on usage message i.e.
>
> C:\PG\postgresql\src\tools\msvc>install
>> Invalid command line options.
>> Usage: "install.bat <targetdir> [installtype]"
>> installtype: client
>
>
> It seems that there are two install options i.e. client, all (any other
> string other than client is being considered or treated as all), the
> following install command works i.e.
>
> install C:\PG\postgresql\inst option_does_not_exist
>
>
> As your patch effects this area of code, I thought to share these findings
> with you,o BTW, it is a minor thing that can be handled in another patch,
>

Well, that's the same behavior that this script has been having for ages.
Let's just update the usage message to mention both "all" and "client". I
see no point in breaking a behavior that has been like that for ages, and
the main point of this patch is to fix the install path issue.


> If you like please feel free to change status to ready for committer.
>

Well, I don't think that the patch author should do that. So I won't do it
by myself.

Attached is an updated patch.
Regards,
-- 
Michael
diff --git a/src/tools/msvc/install.bat b/src/tools/msvc/install.bat
index bed08f1..b84fef0 100644
--- a/src/tools/msvc/install.bat
+++ b/src/tools/msvc/install.bat
@@ -1,10 +1,11 @@
 @echo off
 REM src/tools/msvc/install.bat
 
-if NOT "%1"=="" GOTO RUN_INSTALL
+if NOT [%1]==[] GOTO RUN_INSTALL
 
 echo Invalid command line options.
-echo Usage: "install.bat <path>"
+echo Usage: "install.bat <targetdir> [installtype]"
+echo installtype: all client
 echo.
 REM exit fix for pre-2003 shell especially if used on buildfarm
 if "%XP_EXIT_FIX%" == "yes" exit 1
@@ -20,7 +21,7 @@ CALL bldenv.bat
 del bldenv.bat
 :nobuildenv
 
-perl install.pl "%1" %2
+perl install.pl %1 %2
 
 REM exit fix for pre-2003 shell especially if used on buildfarm
 if "%XP_EXIT_FIX%" == "yes" exit %ERRORLEVEL%
diff --git a/src/tools/msvc/install.pl b/src/tools/msvc/install.pl
index 97e297e..62ef21e 100755
--- a/src/tools/msvc/install.pl
+++ b/src/tools/msvc/install.pl
@@ -15,6 +15,6 @@ Install($target, $insttype);
 sub Usage
 {
 	print "Usage: install.pl <targetdir> [installtype]\n";
-	print "installtype: client\n";
+	print "installtype: all client\n";
 	exit(1);
 }
-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Reply via email to