This is the mail archive of the cygwin 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: Multiple installations and 3PPs (FAQ alert)

On Sat, 22 Jan 2005 11:32:08 -0800, Joshua Daniel Franklin wrote:

> I like the idea of it at least saving mounts. And the paths should work
> (note the "bin"). :)

The only thing I would change is to save the state of the mounts within 
the uninstall script (just before uninstalling), rather than the state 
at install time when /etc/postinstall/ was run.

I also added a warning at the beginning, since this performs such a 
drastic operation, even though the UN*X philosophy is to do what the 
user says, no matter what, as in "rm * .o":

------ BEGIN ------
CYGDIR="`/bin/cygpath -aw /`"
cat > /uninstall.bat <<EOF
@echo Warning! This will remove all of Cygwin!
@echo Use Ctrl-C or Ctrl-Break now to abort. Any other key will continue.
$CYGDIR\\bin\\mount -m > %TEMP%\\saved-mounts.bat
$CYGDIR\\bin\\umount -s -A
$CYGDIR\\bin\\umount -A
copy $CYGDIR\\bin\\cygwin1.dll $CYGDIR\\bin\\regtool.exe %TEMP%
$CYGDIR\\bin\\rm -rf /
del /s $CYGDIR
%TEMP%\\regtool remove "/HKLM/Software/Cygnus Solutions"
%TEMP%\\regtool remove "/HKCU/Software/Cygnus Solutions"
del %TEMP%\\cygwin1.dll %TEMP%\\regtool.exe
------- END -------


Unsubscribe info:
Problem reports:

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