#!/bin/bash source /etc/llxcfg-devel-tools/repositories.conf source /etc/llxcfg-devel-tools/llx-poolman.conf source /etc/llxcfg-devel-tools/pools.list [ ! -r /etc/llxcfg-devel-tools/pools.list.custom ] || source /etc/llxcfg-devel-tools/pools.list.custom _usage() { echo "USAGE: llx-poolman update {leia-mobile-unico|leia-unico|marty-unico}" echo " llx-poolman search PACKAGE" exit 1 } _usage_search() { echo "USAGE: llx-poolman search PACKAGE" exit 1 } # MAIN if [ $(id -u) -ne 0 ] ; then echo "Administration level permissions are needed to run this program" exit 1 fi if [ $# -eq 0 ] ; then _usage fi case $1 in update) shift if [ -z "$1" ] ; then _usage fi case $1 in leia-mobile-unico) $REPREPRO_BINARY -b $POOL_UNICO_1009_MOBILE $UPDATE_OPTIONS update $REPREPRO_BINARY -b $POOL_UNICO_1009_MOBILE retrack $REPREPRO_BINARY -b $POOL_UNICO_1009_MOBILE deleteunreferenced $REPREPRO_BINARY -b $POOL_UNICO_1009_MOBILE export ;; leia-unico) $REPREPRO_BINARY -b $POOL_UNICO_1009 $UPDATE_OPTIONS update $REPREPRO_BINARY -b $POOL_UNICO_1009 retrack $REPREPRO_BINARY -b $POOL_UNICO_1009 deleteunreferenced $REPREPRO_BINARY -b $POOL_UNICO_1009 export ;; marty-unico) $REPREPRO_BINARY -b $POOL_UNICO_1109 $UPDATE_OPTIONS update $REPREPRO_BINARY -b $POOL_UNICO_1109 retrack $REPREPRO_BINARY -b $POOL_UNICO_1109 deleteunreferenced $REPREPRO_BINARY -b $POOL_UNICO_1109 export ;; *) _usage ;; esac ;; search) if [ -z "$1" ] ; then _usage_search fi for p in $LIST_OF_THE_POOLS ; do echo "---------------------" echo "Searching for $2 in $p" $REPREPRO_BINARY -b $p ls $2 done ;; *) _usage ;; esac exit 0