Imported Upstream version 2.15
This commit is contained in:
33
package/solaris/pkg/r.config
Normal file
33
package/solaris/pkg/r.config
Normal file
@@ -0,0 +1,33 @@
|
||||
#!/usr/bin/sh
|
||||
|
||||
compare_cksum() {
|
||||
destfile=$1
|
||||
cksumfile=$2
|
||||
|
||||
installed_cksum=`/usr/bin/tail -1 $cksumfile | /usr/bin/awk '{print $1}'`
|
||||
current_cksum=`/usr/bin/cksum $destfile | /usr/bin/awk '{print $1}'`
|
||||
test $installed_cksum = $current_cksum
|
||||
}
|
||||
|
||||
while read path ; do
|
||||
destpath=`echo $path | /usr/bin/sed -e 's/\/[^/]*$//'`
|
||||
destbase=`/usr/bin/basename $path`
|
||||
cksumfile="${destpath}/.${destbase}.cksum"
|
||||
if [ -f $path ] ; then
|
||||
if [ -f $cksumfile ] ; then
|
||||
compare_cksum $path $cksumfile
|
||||
if [ $? -eq 0 ] ; then
|
||||
/usr/bin/rm -f $path $cksumfile
|
||||
else
|
||||
echo "$path has been modified since it was installed -- "
|
||||
echo " leaving it in place."
|
||||
fi
|
||||
else
|
||||
echo "$path may have been modified since it was installed -- "
|
||||
echo " leaving it in place."
|
||||
fi
|
||||
fi
|
||||
done
|
||||
if [ "$1" = "ENDOFCLASS" ] ; then
|
||||
exit 0
|
||||
fi
|
||||
Reference in New Issue
Block a user