Here are two patches for localepurge-0.5.2. The first is a general cleanup patch, the second moves what used to be the pretending action to a new action called list (I felt this was more appropriate for what it does), and creates a new pretend action printing all the files that would be deleted if run without pretend. See a more detailed summary below. Patch 1: eerror echoes to stderr Line up and help text and put it in alphabetical order Put option parsing in alphabetical order Change option parsing to elifs, and add an else clause for unrecognised options Apply consistant coding style: Indent = 4 spaces if [ .. ]; then Remove replicated code Add verbosity requirement to pretend status info Patch 2: Define default ACTION as /bin/rm Define new print function Add list to option parsing and help Crash out on list and pretend enabled at the same time Change /bin/rm to ACTION Change PRETEND to LIST in certain places Add pretend status message and change wording of list status message
Created attachment 98793 [details, diff] First patch - general cleanup
Created attachment 98794 [details, diff] Second patch - add list action and change operation of pretend action
Created attachment 99042 [details, diff] Updated second patch - add list action and change operation of pretend action The original second patch had a syntax error - bash would choke on "else;". This is now fixed.
thanks, nice patch :) 0.5.3 now in CVS