X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=getkexcludes.sh;h=d45524c766386b4e6ec476dbbb50e47c8e67a6d1;hb=refs%2Fheads%2Flxc_devel;hp=bcb025a19fd6222af7a953b15616ac64d9415f38;hpb=e660bf56db32cae88bfb5c25a9918490956554a8;p=build.git diff --git a/getkexcludes.sh b/getkexcludes.sh index bcb025a1..d45524c7 100755 --- a/getkexcludes.sh +++ b/getkexcludes.sh @@ -4,13 +4,29 @@ COMMAND=$(basename $0) . $(dirname $0)/build.common function usage () { - echo "Usage: $COMMAND" + echo "Usage: $COMMAND [-f fcdistro]" echo "outputs the list of packages to exclude from the stock repositories" echo "this is set in build.common, and needs to fit the set of packages" echo "that we override in the planetlab build" exit 1 } +while getopts "f:" opt ; do + case $opt in + f) FCDISTRO=$OPTARG ;; + h|*) usage ;; + esac +done + +toshift=$(($OPTIND - 1)) +shift $toshift + [[ -n "$@" ]] && usage -echo "$pl_KEXCLUDES" +# if the fcdistro is passed in argument +if [ -n "$FCDISTRO" ] ; then + pl_getKexcludes "$FCDISTRO" +# otherwise use the value for the current system +else + echo "$pl_KEXCLUDES" +fi