This is the mail archive of the cygwin-apps mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Setup patch to keep test version if test version installed


Corinna Vinschen writes:
> ...in other words, just drop the last three lines in your setup.hint,
> and the external-source hint.

Done.

I noticed just in time that the preremove scripts can't be dash scripts
at the moment.

Here's a patch to change that and also allow ".cmd" scripts, just like
already done for postinstall scripts:

    install.cc: allow .dash and .cmd extensions for preremove scripts also

	Modified   install.cc
diff --git a/install.cc b/install.cc
index 60c248d..653d623 100644
--- a/install.cc
+++ b/install.cc
@@ -160,10 +160,12 @@ Installer::preremoveOne (packagemeta & pkg)
   Progress.SetText1 ("Running preremove script...");
   Progress.SetText2 (pkg.name.c_str());
   Log (LOG_PLAIN) << "Running preremove script for  " << pkg.name << endLog;
-  try_run_script ("/etc/preremove/", pkg.name, ".sh");
-  try_run_script ("/etc/preremove/", pkg.name, ".bat");
+  const unsigned numexts = 4;
+  const char* exts[numexts] = { ".dash", ".sh", ".bat", ".cmd" };
+  for (unsigned i = 0; i < numexts; i++)
+    try_run_script ("/etc/preremove/", pkg.name, exts[i]);
 }
 
 void
 Installer::uninstallOne (packagemeta & pkg)
 {


Regards,
Achim.
-- 
+<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+

Factory and User Sound Singles for Waldorf Q+, Q and microQ:
http://Synth.Stromeko.net/Downloads.html#WaldorfSounds


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]