File:  [Research Unix] / researchv9 / X11 / src / X.V11R1 / util / dist.clean / cleanup.sh
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs
Tue Apr 24 17:22:00 2018 UTC (8 years, 1 month ago) by root
Branches: belllabs, MAIN
CVS tags: researchv9-SUN3_old, researchv9-SUN3, HEAD
researchv9-SUN3(old)

#!/bin/sh

case "$0" in
*/*)	DIR=`expr "$0" : '\(.*\/\).*'`;;
*)	DIR=;;
esac

case "$1" in
"")	echo "Usage: $0 dir"
	exit 1
	;;
esac

trap "rm -f /tmp/cleanup.*; exit 0" 0 1 2
find $1 \
    \( \
	\( -type f \
		\( -name '*.[oa]' \
		-o -name '*~' \
		-o -name '#*' \
		-o -name '*.old' \
		-o -name '*.diff' \
		-o -name 'diffout' \
		-o -name '*.orig' \
		-o -name '*.rej' \
		-o -name '*.log' \
		-o -name 'tags' \
		-o -name 'TAGS' \
		-o -name 'core' \
		-o -name 'Makefile.bak' \
		-o -name '*.ln' \
		\) \
	\) \
	-o \
	\( -type d -a -name RCS \) \
    \) -print \
| grep -v doc/Xlib/Xsrc | split -100 - /tmp/cleanup.

for file in /tmp/cleanup.??
do
	rm -ri `cat $file`
done
rm -i `find $1 -perm -711 -type f -print`
rm -ri $1/fonts/snf/* \
	$1/clients/xmh \
	$1/server/servertype \
	$1/server/allfiles \
	$1/bin \
	$1/lib

echo "cleaning up symbolic links"
${DIR}makelinks.sh $1 > $1/link-setup

rm -i `find $1 -type l -print`

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.