arfoll / unrarall

bash script to unrar everything and cleanup in a given directory
GNU General Public License v3.0
260 stars 68 forks source link

Introduced "clean up hooks" #6

Closed delcypher closed 11 years ago

delcypher commented 11 years ago

Introduced "clean up hooks" which are a family of functions (with prefix unrarall-clean- ) which can perform different clean up tasks.

The basic code to parse the command line options, verify they are valid and actually execute them (untested) are in place. Sorry I didn't have any rar files to hand (I deleted them all recently with unrarall :D ) to do any testing

unrarall-clean-rar and unrarall-clean-nfo have been implemented but not tested.

All other hooks (except the virtual hooks "none" and "all") have stub code only and need to be implemented and tested.

Please do some testing!

arfoll commented 11 years ago

Still needs more testing, I've run it on a few things and this seems to be working fine. Stubs need to be implemented, I've only implemented the windows junk (Thumbs.db) and OSX (.DS_Store). Why are we using -iregex instead of -regex? are there really files with .RAR extensions? Wouldn't it be easier to add that to our regex instead of using -iregex? What do you think?

Also for the sample hook, it would be good to get some input on what the regex should be....

delcypher commented 11 years ago

All the hooks (at least the ones I wanted) have been (basically) implemented. This all needs testing before these commits are merged into master.

If anyone has some clever ideas for the existing hooks and a new hook then please suggest them to us.

arfoll commented 11 years ago

Wow. :) I was just going to start doing stuff this morning, but you've done it all!

delcypher commented 11 years ago

@arfoll : Not entirely. It's still not fully tested.

delcypher commented 11 years ago

I pushed a few other things. The most important thing is 40e40e40365afdf2c0ceab18f48a7bbee0a98e16

Can you test it?

If everything works okay would you (@arfoll) like to do a merge (or rebase to tidy up history first)?

delcypher commented 11 years ago

I did a few tests. It seemed to work fine. I noticed that the information about cksfv would appear even if I didn't use --verbose so I decided I'd show more information about the running hooks even if --verbose isn't used.

Have a test and see what you think.