BASH   14

mksrpms

Guest on 25th January 2023 01:54:09 AM


  1. #!/bin/bash
  2.  
  3. #rpm -qp --qf "%{SOURCERPM}\n" ../i386/RedHat/RPMS/* | sort | uniq > srpmlist
  4.  
  5. rm -rf ../SRPMS/*
  6.  
  7. for srpm in `cat ./srpmlist`
  8. do
  9. #       echo $srpm
  10.         if [ -f ../SRPMS.centos/$srpm ]; then
  11.                 cp -al ../SRPMS.centos/$srpm ../SRPMS
  12.         elif [ -f /home/centos-3/source/i386/SRPMS/$srpm ]; then
  13.                 cp -al /home/centos-3/source/i386/SRPMS/$srpm ../SRPMS
  14.         elif [ -f /home/centos/build/centos/3build7/SRPMS/$srpm ]; then
  15.                 cp -al /home/centos/build/centos/3build7/SRPMS/$srpm ../SRPMS
  16.         elif [ -f /home/caos/centos-3/3build7/updates/i386/SRPMS/$srpm ]; then
  17.                 cp -al /home/caos/centos-3/3build7/updates/i386/SRPMS/$srpm ../SRPMS
  18.         else
  19.                 echo $srpm not found
  20.         fi
  21.  
  22. done

Raw Paste


Login or Register to edit or fork this paste. It's free.