Re: [gentoo-user] Re: Is udev-mount still valid?

2018-04-14 Thread Floyd Anderson

On Sat, 14 Apr 2018 17:25:36 -0700
Ian Zimmerman  wrote:

On 2018-04-15 00:10, Floyd Anderson wrote:


> https://very.loosely.org/paste/symlinks-pl



Because argument ROOTDIR is mandatory, the script should do something
when ROOTDIR is not given, e.g. print usage. Maybe ‘-r’ should be also
mandatory or the script should define some useful defaults. Consider
following invocations:

   $ ./symlinks-pl
   $ ./symlinks-pl /path/to/broken-symlink
   $ ./symlinks-pl -r /path/to/broken-symlink

which do nothing and results with exit code 0.


I think this is more of a documentation bug in usage().  ROOTDIR is in
fact not mandatory - a list of zero or more items is expected, and each
item processed in turn.  I remember thinking about it for a second, and
this was the most consistent and regular behavior, so the most
attractive to my droid mind :-P


Then, I think, ROOTDIR in synopsis of `symlinks-pl --help` should be:

   symlinks-pl [OPTION ...] [ROOTDIR ...]

like OPTION instead of:

   symlinks-pl [OPTION ...] ROOTDIR ...

to be more consistent to other command line tools. But I see your point 
and forget to say thanks for sharing. ;-)



--
Regards,
floyd




Re: [gentoo-user] Re: Is udev-mount still valid?

2018-04-14 Thread Floyd Anderson


Hi Ian,

On Sat, 14 Apr 2018 09:58:51 -0700
Ian Zimmerman  wrote:

On 2018-04-13 23:18, Floyd Anderson wrote:


   # find /{etc,lib,usr,var} -path /etc/config-archive -prune -o \
   -type l -xtype l -print


there is also the app-misc/symlinks package,


TBH, I don’t expected there exists a package for this, so I’ve never 
searched for it and its additional features. Thanks for the input Ian.



and my own baby for the same purpose:

https://very.loosely.org/paste/symlinks-pl



It’s nice even it runs a little bit slower. I like the prefixed or ‘\0’ 
separated output for further processing of its result.


One pernickety remark (do not overrate it):

Because argument ROOTDIR is mandatory, the script should do something 
when ROOTDIR is not given, e.g. print usage. Maybe ‘-r’ should be also 
mandatory or the script should define some useful defaults. Consider 
following invocations:


   $ ./symlinks-pl
   $ ./symlinks-pl /path/to/broken-symlink
   $ ./symlinks-pl -r /path/to/broken-symlink

which do nothing and results with exit code 0.


--
Regards,
floyd