BASH
14
mksrpms
Guest on 25th January 2023 01:54:09 AM
#!/bin/bash
#rpm -qp --qf "%{SOURCERPM}\n" ../i386/RedHat/RPMS/* | sort | uniq > srpmlist
rm -rf ../SRPMS/*
for srpm in `cat ./srpmlist`
do
# echo $srpm
if [ -f ../SRPMS.centos/$srpm ]; then
cp -al ../SRPMS.centos/$srpm ../SRPMS
elif [ -f /home/centos-3/source/i386/SRPMS/$srpm ]; then
cp -al /home/centos-3/source/i386/SRPMS/$srpm ../SRPMS
elif [ -f /home/centos/build/centos/3build7/SRPMS/$srpm ]; then
cp -al /home/centos/build/centos/3build7/SRPMS/$srpm ../SRPMS
elif [ -f /home/caos/centos-3/3build7/updates/i386/SRPMS/$srpm ]; then
cp -al /home/caos/centos-3/3build7/updates/i386/SRPMS/$srpm ../SRPMS
else
echo $srpm not found
fi
done