INCLUDES = -I$(top_srcdir)/include -I$(top_srcdir)/sys
bin_PROGRAMS = afile achfile
-bin_SCRIPTS = acleandir.rc
afile_SOURCES = afile.c common.c common.h
achfile_SOURCES = achfile.c common.c common.h
-
-EXTRA_DIST = acleandir.rc
+++ /dev/null
-#! /usr/bin/rc
-#
-# acleandir [-rvnid] dir
-#
-# removes orphan AppleDouble files
-#
-# gerry.tomlinson@ncl.ac.uk 2/3/98
-#
-# note - don't follow symbolic links to directories in recursive option
-
-
-fn emptydir {
-~ $1/* $1/'*' && return 0
-return 1
-}
-
-fn doit {
-~ $ropt 1 && for (i in $1/*) {
- [ -d $i -a ! '(' $testsym $i ')' ] && doit $i
-}
-
-AD=$1/.AppleDouble
-ADT=$1/.AppleDesktop
-
-[ -d $AD ] || return
-
-#
-# first handle the .AppleDesktop dir
-#
-if (~ $aopt 1 && [ -d $ADT ] ) {
- if (~ $iopt 1 ) {
- echo -n remove $ADT '?'
- ~ `{line} [yY] && rm -r $ADT
- } else {
- if (~ $nopt 1) {
- echo $ADT to be removed
- } else rm -r $ADT
- }
-}
-
-#
-# now look at the .AppleDouble dir
-#
-emptydir $AD || for (i in $AD/*) {
- if (~ $aopt 1 || ! afile $i >/dev/null >[2=1] ) {
- sizemess = ()
- size = `{wc -c $i}
- ! ~ $size(1) 589 && sizemess = 'size='^$size(1)
- if (~ $iopt 1 ) {
- size = `{wc -c $i}
- echo -n remove '`'$i''''^$sizemess^' ? '
- ~ `{line} [yY] && rm $i
- } else {
- if (~ $nopt 1 ) {
- echo '`'$i''''^' to be removed '^$sizemess
- } else rm $i && ~ $vopt 1 && echo $i removed
- }
- }
- }
-
-if ( ~ $dopt 1 && emptydir $AD ) {
- rm -f $AD/.Parent
- rmdir $AD >/dev/null >[2=1] && ~ $vopt 1 && echo empty directory $AD removed
-}
-
-
-
-}
-
-#
-# start here
-#
-
-#
-# first cope with different test for symlink options
-#
-testsym = -L
-[ - L . ] >[2] /dev/null
-~ $status 1 || testsym = -h
-
-~$#* 0 || * =`{getopt darnviR $*}
-
-for (i) {
- switch ($i) {
- case -[rR]
- shift; ropt = 1
- case -v
- shift; vopt = 1
- case -n
- shift; nopt = 1
- case -i
- shift; iopt = 1;
- case -d
- shift; dopt = 1;
- case -a
- shift; aopt = 1; dopt = 1;
- case --
- shift; break;
- }
-}
-
-~ $#* 0 && {echo usage: acleandir [-rnvia] dir; exit 1}
-
-[ -d $1 ] || {echo >[1=2] acleandir: $1 not a directory; exit 2}
-
-doit $1
-
-
GENERATED_MANS = apple_cp.1 apple_mv.1 apple_rm.1 uniconv.1 asip-status.pl.1
TEMPLATE_FILES = apple_cp.1.tmpl apple_mv.1.tmpl apple_rm.1.tmpl uniconv.1.tmpl asip-status.pl.1.tmpl
NONGENERATED_MANS = achfile.1 \
- acleandir.1 \
aecho.1 \
afile.1 \
afppasswd.1 \
+++ /dev/null
-.TH acleandir 1 "26 Feb 1998" 2.0.0 Netatalk
-.SH NAME
-acleandir \- clean up a directory containing netatalk Apple Macintosh files
-.SH SYNOPSIS
-\fBacleandir\fR [\-rnvi] \fBdirname\fR
-.sp 1
-.SH DESCRIPTION
-acleandir cleans up the directory \fIdirname.\fR By default it simply removes
-"orphan" AppleDouble files, i.e. those which do not have a
-corresponding data file.
-.SH OPTIONS
-.TP
-\fB\-d\fR
-Also remove the .AppleDouble directory if it contains no
-AppleDouble files after "orphan" removal. This will result
-in the finder location of \fIdirname\fR
-within its parent being lost.
-.TP
-\fB\-r\fR, \fB\-R\fR
-Recursive. Clean up directories recursively.
-.TP
-\fB\-n\fR
-Display the filenames of "orphans" but don't
-remove any. Display size if "orphan" appears to contain a
-resource fork.
-.TP
-\fB\-i\fR
-Interactive. Prompt for confirmation before a removal. A y in
-answer confirms that the removal should proceed.
-.TP
-\fB\-v\fR
-Verbose. Display the names of all "orphans" and
-\&.AppleDouble directories removed. Reports the size if the
-"orphan" appears to contain a resource fork.
-.TP
-\fB\-a\fR
-Aggressive. Remove all AppleDouble files, not just
-"orphans". Also remove the .AppleDesktop directory if
-present. Impies \fB\-d\fR option. Use with caution as the
-Macintosh type/creator and finder location of all files will be lost
-and the content of some documents, such as Symantec Projects, will
-be destroyed.
-.SH DIAGNOSTICS
-returns exit status 0 unless bad options are provided or a directory
-is not given on the command line.
-.SH "SEE ALSO"
-\fBafile\fR(1),
-\fBafpd\fR(8)
-