verify-files.sh revision 149
20057N/A#!/bin/sh
20057N/A
20057N/A# do some mapping for the naimng convention of the two lists
20057N/A# gtk2 -> gtk+
20057N/A# glib2 -> glib
20057N/A# GConf -> gconf
20057N/A# control-center -> gnome-control-center
20057N/A#
20057N/Abase_initial=""
20057N/A
20057N/Acase "$1" in
20057N/A *gtk2*) base_initial="gtk+"
20057N/A ;;
20057N/A "glib2") base_initial="glib"
20057N/A ;;
20057N/A "GConf") base_initial="gconf"
20057N/A ;;
20057N/A "control-center") base_initial="gnome-control-center"
20057N/A ;;
20057N/A *) base_initial=$1
20057N/A ;;
20057N/Aesac
20057N/A
20057N/Aecho "base_initial is $base_initial"
20057N/A
20057N/A# Need to merge all the rpms into one
20057N/A# Strip out all the locale stuff
20057N/A
20057N/Als /usr/src/packages/RPMS/*/$1* > /tmp/rpms.$$
20057N/Acat /tmp/rpms.$$ | while read rpm
20057N/Ado
20057N/A rpm -qpl $rpm | grep -v locale >> /tmp/$1.myfiles
20057N/Adone
20057N/A
20057N/A# sort the content to make comparison more meaningful
20057N/A
20057N/Asort -u /tmp/$1.myfiles > /tmp/$1.myfiles.sorted
20057N/A
20057N/A
20057N/A# Take the reference files list and substitute prefix and sysconfdir
20057N/A
20057N/Acat /sgnome/pkgs/gnome-2.2/misc/files-2.2/$base_initial.lst | sed 's/opt\/gnome-2.2/usr/' | sed 's/usr\/etc/etc/' >> /tmp/$base_initial.ref-files-2.2
20057N/A
20057N/Asort -u /tmp/$1.ref-files-2.2 > /tmp/$base_initial.ref-files-2.2.sorted
20057N/Adiff -u /tmp/$1.myfiles.sorted /tmp/$base_initial.ref-files-2.2.sorted
20057N/A
20057N/A# clean up
20057N/Arm /tmp/rpms.$$ /tmp/$1.myfiles /tmp/$1.ref-files-2.2
20057N/A