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, Joshua Daniel Franklin wrote:

> > On Sat, 22 Jan 2005 01:51:38 -0500 (EST), Igor Pechtchanski wrote:
> >
> > | Should we, perhaps, provide a small 'uninstall' script, maybe in
> > | /usr/sbin, that would perform a umount and then use regtool to remove the
> > | registry key?  It could even be a .bat, which will enable it to delete all
> > | of Cygwin once the last Cygwin process exits...  A postinstall script
> > | could generate it, too, so that it contains explicit paths of the Cygwin
> > | root directory.
>
> I like the idea of it at least saving mounts. And the paths should work
> (note the "bin"). :)

Whoops!  Missed that.

However, the mounts should be saved *inside* uninstall.bat, using a
Windows path.  :-)
Also, since you're *uninstalling* Cygwin, the mounts should go into a
.bat, not a .sh, with a more suggestive name...

------ BEGIN gen-uninst.sh ------
#!/bin/sh
CYGDIR="`/bin/cygpath -aw /`"
cat > /uninstall.bat <<EOF
$CYGDIR\\bin\\mount -m > %TEMP%\\restore-mounts.bat
$CYGDIR\\bin\\umount -s -A
$CYGDIR\\bin\\umount -A
copy $CYGDIR\\bin\\cygwin1.dll $CYGDIR\\bin\\regtool.exe %TEMP%
copy $CYGDIR\\saved-mounts.sh %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
echo Cygwin is now un-installed.
echo To restore the mounts later, run %TEMP%\\restore-mounts.bat
EOF
------- END gen-uninst.sh -------

HTH,
	Igor
-- 
				http://cs.nyu.edu/~pechtcha/
      |\      _,,,---,,_		pechtcha@cs.nyu.edu
ZZZzz /,`.-'`'    -.  ;-;;,_		igor@watson.ibm.com
     |,4-  ) )-,_. ,\ (  `'-'		Igor Pechtchanski, Ph.D.
    '---''(_/--'  `-'\_) fL	a.k.a JaguaR-R-R-r-r-r-.-.-.  Meow!

"The Sun will pass between the Earth and the Moon tonight for a total
Lunar eclipse..." -- WCBS Radio Newsbrief, Oct 27 2004, 12:01 pm EDT

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


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