From 5e5c2d317d9afe7327a75a6c35099510e1f8bb9c Mon Sep 17 00:00:00 2001 From: tnut Date: Sun, 27 Mar 2011 15:49:30 +0200 Subject: pkg-get, remplacé par pkg-get-awk MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- base/pkg-get/syn | 29 +++++++++++------------------ 1 file changed, 11 insertions(+), 18 deletions(-) (limited to 'base/pkg-get/syn') diff --git a/base/pkg-get/syn b/base/pkg-get/syn index d29fcd6f7..95284d529 100644 --- a/base/pkg-get/syn +++ b/base/pkg-get/syn @@ -25,23 +25,22 @@ fi if ! mountpoint /media/cdrom > /dev/null; then find_cd fi -if [ ! -L /depot ]; then - for i in `cat /etc/pkg-get.conf |grep -v ^#|grep http|cut -d "|" -f 1|cut -d" " -f2|cut -d"/" -f4` - do - if [ -a $Depot/$i ]; then - rm -r $Depot/$i - fi - done - pkg-get sync - for i in `cat /etc/pkg-get.conf |grep -v ^#|grep http|cut -d "|" -f 1|cut -d" " -f2|cut -d"/" -f4` - do +for i in `cat /etc/pkg-get.conf |grep -v ^#|grep http|cut -d "|" -f 1|cut -d" " -f2|cut -d"/" -f4` +do + if [ -a $Depot/$i ]; then + rm -r $Depot/$i + fi + mkdir -p $Depot/$i +done +pkg-get sync +for i in `cat /etc/pkg-get.conf |grep -v ^#|grep http|cut -d "|" -f 1|cut -d" " -f2|cut -d"/" -f4` +do if [ -d $MediaDepot/$i ]; then rm -r $Depot/$i > /dev/null 2>&1 mkdir -p $Depot/$i for j in $MediaDepot/$i/*.xz do let PKGNB=$PKGNB+1 - fj=`basename $j` ln -sf $MediaDepot/$i/$fj $Depot/$i/$fj echo -n -e "$PKGNB Paquets trouvés sur le média\r" @@ -49,10 +48,4 @@ if [ ! -L /depot ]; then echo "$PKGNB Paquets trouvés sur le média" cp $MediaDepot/$i/PKG* $Depot/$i/ fi - done -else - for i in `cat /etc/pkg-get.conf |grep -v ^#|grep http|cut -d "|" -f 1|cut -d" " -f2|cut -d"/" -f4` - do - rsync -avuz --delete-before rsync://nutyx.meticul.eu/nutyx/attapu/i686/$i/ $Depot/$i/ - done -fi +done -- cgit v1.2.3-70-g09d2