Re: FreeDOS UNINSTALL wanted / DEL @listfile tool wanted

Wolf Bergenheim <[email protected]>
Newsgroups gmane.os.freedos.devel
Message-ID <[email protected]>
On Fri, 18 Oct 2002, Eric Auer wrote:

> Now my question:
> Does anybody know such a "delete all files mentioned in listfile"
> tool, with or without the prefix functionality?

Well I don't know any such tool, but I would be willing to extend the rm
of DOG to accept @listfile. (I've been looking for some inspiration on to
code on DOS, and I feel this is it. Thanx :)

> Is anybody willing to write a few nice batchfiles called
> install and uninstall that would show you the contents of a .zip,
> then prompt you for a base/prefix directory, then install all stuff
> there and log the process as described above in the install case
> and for the uninstall case, show the list and eventually the prefix,
> allow the user to accept/override the prefix (if no prefix is found
> in the list, the default would be something like \ or \freedos\) and
> then, automatically or interactively (with delete this? prompt per
> file, that is del /p mode), delete all the files that belong to the
> package?

I guess I could do this too.

> Syntax could be:
> install package [prefix] [/simulateonly]
> uninstall [package|zipfile|listfile] [prefix] [/prompt]
> or similar.

A nice and compace spec ;)

>
> Feel free to use more powerful languages than batchfiles.
>

C rules ;)... Hmmm I'll see what I'll cook up.

> To get started, I would already be happy with a tool that does
> "delete all files in list", because then I can at least uninstall
> semi-automatically. By the way, with the Linux shell I can do this:

OK I'll start with that.

>
> > rm -vf $(zipinfo -1 test.zip )
> (rm does not allow to delete directories, you need to use rmdir. Just
> like in DOS. But stale directories are not too bad, stale files are worse)

you do know that rm can do -r to remove recursively combine it with with
-f and rm will also whisk away the dirs. so you would say:
> rm -vrf $(zipinfo -1 test.zip )
and get no complaints, and no stale dirs either. Linux is nice ;)

> I think you get my point. I would be happy to be able to do the same
> with DOS. Less flexibility is of course okay, nobody needs to add $(...)
> to FreeCOM.

Phew ;) (post bash to DOS...)

> If there is a DOS version of sed (the stream editor,

yes there is. (IIRC)
and same goes for rm and ls BTW (which I like using)


> Thanks for your feedback. I hope you think that the ability to uninstall
> zip files is a really useful feature. I do.

Yeah. I agree. Guess what? When I complete this we will have a rudimentary
package handler... Hmmm I think I'll have another clooose look at the .dep
package system (it has some nice features like installation scripts inside
the .deb itself, dependencies etc... ;)

Back to earth...
Here is my plan:

1. change rm (of DOG) so that it accepts @filename as a file with a list
of files to remove (should be easy)
2. I'll write some install / uninstall batch progs
3. examine .deb with a microscope (i.e. read docs and code...)
4. think... :)

What do you think?

--Wolf

-- 

  |\ _		Maintainer of DOG - The New Shell!
  |  .\---.	http://dog.sourceforge.net/index.php
 /  ,____/	http://sourceforge.net/projects/dog
/   /C:\DOG\>_	[email protected]

Humpty Dumpty sat on a wall
Humpty Dumpty had a great fall
All the king's horses and all the king's men
Couldn't put Humpty together again.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.