Update misc/check-hardlinks

Add --fix-diverged option to fix diverged files: the file is removed and
a hardlink to the reference file is created.

Also modify the --fix-missing option not to imply --fix.
Update misc/check-hardlinks

Add -V|--version flag.
Update misc/check-hardlinks

Fix incorrect file reachability test with file paths containing no
slashes (relative path to a file in the current directory).
Update misc/check-hardlinks

Deprecate the -f|--fix option and add the -b|--fix-broken option to
replace it.
Merge branch 'master' of github.com:laomaiweng/scripts
Update misc/check-hardlinks

Revamp return code mechanism:
* codes for different issues are now or-combined (instead of the highest
  value being returned)
* fixed issues do not raise the return code

Also fixed a bug that caused the return code to be reset at the
beginning of each file when checking several hardlinks files.
Update misc/check-hardlinks

Add --fix-unreachable option to fix unreachable files, creating
intemediate directories along the way.
Also change the order of tests so that unreachable files do not appear
as missing until an attempt as --fix-missing is made.
Update misc/check-hardlinks

Don't display the "All good" message if some files were fixed.
Update misc/check-hardlinks

Correct display of whole line when a single one was missing/diverged,
and add display of reference file at the end of each issue report.
Update misc/check-hardlinks

* Use enhanced getopt(1) for options parsing
* Fix return code not updated in --quiet mode
* Use builtin Bash booleans to test for options instead of [[ -z ]] /
  [[ -n ]] tests
* Use (( arithmetic expressions )) for arithmetic tests instead of
  regular [[ tests ]]

Version: 0.5