|
Server : Apache System : Linux server.mata-lashes.com 3.10.0-1160.90.1.el7.x86_64 #1 SMP Thu May 4 15:21:22 UTC 2023 x86_64 User : matalashes ( 1004) PHP Version : 8.1.29 Disable Function : NONE Directory : /bin/ |
Upload File : |
#!/bin/sh
[ -z "$1" -o -z "$2" ] && {
# usage
echo "usage: $0 <directory> <diff-extension>" 1>&2
exit 1
}
: ${DIFF:=diff}
: ${GENDIFF_DIFF_ARGS:=-up}
: ${GENDIFF_DIFF_CHANGELOG_ARGS:=-U0}
find $1 \( -name "*$2" -o -name ".*$2" \) -print | sort |
while read f; do
U="${GENDIFF_DIFF_ARGS}"
[ "`basename $f`" = "ChangeLog$2" ] && U="${GENDIFF_DIFF_CHANGELOG_ARGS}"
diffcmd="${DIFF} ${U} /dev/null ${f%$2}"
# ${DIFF} ${U} $f `echo $f | sed s/$2\$//`
if [ -r "$f" ]; then
diffcmd="${DIFF} ${U} ${f} ${f%$2}"
fi
echo "${diffcmd}"
${diffcmd}
done