From b3e4899f75c1730b88b1e79a6dd70e27731b8f7c Mon Sep 17 00:00:00 2001 From: Karanbir Singh Date: Nov 19 2011 01:36:42 +0000 Subject: parameterise the requirement list --- diff --git a/utils/c5_cleanup_vm.sh b/utils/c5_cleanup_vm.sh index f26486e..a540dcb 100644 --- a/utils/c5_cleanup_vm.sh +++ b/utils/c5_cleanup_vm.sh @@ -1,11 +1,12 @@ #!/bin/sh # you will almost never want to run this script. +# $1 = file name ( full path ) with rpms to retain echo -n 'erase ' > /tmp/yum-cleanup for f in `rpm -qa`; do pn=$(rpm --qf "%{name}\n" -q $f) - if [ `grep $pn c5_req_list | wc -l ` -lt 1 ] ; then + if [ `grep $pn $1 | wc -l ` -lt 1 ] ; then echo -n $f ' ' >> /tmp/yum-cleanup fi done