3 #=======================================================================
5 # File ID: 9b90e1dc-5d45-11df-8c34-90e6ba3022ac
7 # Change file ownership of a subdirectory tree to "sunny" and set the
8 # sticky bit on directories so he (I) will continue to own new files.
9 # Mainly used for .git directories.
11 # Author: Øyvind A. Holm <sunny@sunbase.org>
12 # License: GNU General Public License version 2 or later.
13 #=======================================================================
27 " -n "$progname" -- "$@
")"
28 test "$?" = "0" ||
exit 1
36 -h|
--help) opt_help
=1; shift ;;
37 -q|
--quiet) opt_quiet
=$
(($opt_quiet + 1)); shift ;;
38 -v|
--verbose) opt_verbose
=$
(($opt_verbose + 1)); shift ;;
39 --version) echo $progname $VERSION; exit 0 ;;
41 *) echo $progname: Internal error
>&2; exit 1 ;;
44 opt_verbose
=$
(($opt_verbose - $opt_quiet))
46 if test "$opt_help" = "1"; then
47 test $opt_verbose -gt 0 && { echo; echo $progname $VERSION; }
50 Change file ownership of a subdirectory tree to "sunny" and set the
51 sticky bit on directories so he (I) will continue to own new files.
52 Mainly used for .git directories.
54 Usage: $progname [options] DIRECTORY [DIRECTORIES [...]]
61 Be more quiet. Can be repeated to increase silence.
63 Increase level of verbosity. Can be repeated.
65 Print version information.
71 if test "$1" = ""; then
72 echo "$progname: No directory specified" >&2
79 echo "$progname: $ft: Directory not found" >&2
83 test "$abort" = "1" && { echo "$progname: Aborting." >&2; exit 1; }
84 chown
-Rc sunny.sunny
"$@"
85 find "$@" -type d
-print0 |
xargs -0 chmod -c +s