diff options
Diffstat (limited to 'base')
-rw-r--r-- | base/pkg-get/.md5sum | 4 | ||||
-rw-r--r-- | base/pkg-get/Pkgfile | 2 | ||||
-rw-r--r-- | base/pkg-get/pkg-get.conf | 12 | ||||
-rw-r--r-- | base/pkg-get/syn | 38 |
4 files changed, 31 insertions, 25 deletions
diff --git a/base/pkg-get/.md5sum b/base/pkg-get/.md5sum index 14eba5747..6469b32ef 100644 --- a/base/pkg-get/.md5sum +++ b/base/pkg-get/.md5sum @@ -1,3 +1,3 @@ 91a314edd2a2ba5dca5bbe7472521ccf pkg-get-0.5.1.tar.gz -a28fcf9580524d8865e05b223afa738f pkg-get.conf -1d8f66bd8d6ff3ac4f3486efdbc453dd syn +1739a7c851834393f8e0bd216cb1f137 pkg-get.conf +1571a08b2de3ed77babb7b5ecae4c2a6 syn diff --git a/base/pkg-get/Pkgfile b/base/pkg-get/Pkgfile index b42f44a16..a54678b3d 100644 --- a/base/pkg-get/Pkgfile +++ b/base/pkg-get/Pkgfile @@ -5,7 +5,7 @@ name=pkg-get version=0.5.1 -release=1 +release=2 source=(http://kiao.no-ip.info/NuTyX/files/$name-$version.tar.gz \ pkg-get.conf syn) diff --git a/base/pkg-get/pkg-get.conf b/base/pkg-get/pkg-get.conf index 5c32b5f5e..e19dab3a2 100644 --- a/base/pkg-get/pkg-get.conf +++ b/base/pkg-get/pkg-get.conf @@ -3,18 +3,6 @@ # # pkg-get configuration file # Dépot des paquets NuTyX - -# ********************************************************************** -# * Explications * -# ********************************************************************** - -# Par défault, seul le dépot "release" est activé. - -# Si vous souhaitez inclure vos propre paquets binaires lors de la prochaine -# demande de mise à jour via la commande "check", -# veuillez alors décommenter la ligne ci-dessous -# pkgdir /srv/NuTyX/locale - pkgdir /srv/NuTyX/release|http://nutyx.meticul.eu/attapu/uname-m/release # runscripts: if "yes" pre-post install scripts are # automatically executed. Handle with care. diff --git a/base/pkg-get/syn b/base/pkg-get/syn index 70beace61..d29fcd6f7 100644 --- a/base/pkg-get/syn +++ b/base/pkg-get/syn @@ -1,16 +1,32 @@ #!/bin/bash MediaDepot=/media/cdrom/depot Depot=/srv/NuTyX +find_cd() { +EXPECT_LABEL="nutyxcd" +let PKGNB=0 +for SYS in /sys/block/sd* /sys/block/sr* ; do + if [ ! -d "$SYS" ]; then continue; fi + DEV=/dev/${SYS##*/} + LABEL=`dd if=$DEV bs=1 skip=32808 count=32 2>/dev/null` + if [ $LABEL == $EXPECT_LABEL ] 2>/dev/null ; then + mkdir -p /media/cdrom 2>/dev/null + mount $DEV /media/cdrom + if [ ! -d /media/cdrom/depot ]; then + umount -n /media/cdrom + fi + break + fi +done +} if [ ! "$EUID" -eq 0 ]; then echo "Seul le compte root peut synchroniser les ports NuTyX" exit 1 fi +if ! mountpoint /media/cdrom > /dev/null; then + find_cd +fi if [ ! -L /depot ]; then - if [ ! -d $Depot/locale ]; then mkdir -p $Depot/locale; fi - pushd $Depot/locale > /dev/null - pkg-repgen - popd - for i in test release + 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 @@ -20,14 +36,17 @@ 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 [ -d $MediaDepot/$i ]; then - echo "Dépot $i trouvé sur le media" rm -r $Depot/$i > /dev/null 2>&1 mkdir -p $Depot/$i - for j in $MediaDepot/$i/*.gz + for j in $MediaDepot/$i/*.xz do + let PKGNB=$PKGNB+1 + fj=`basename $j` - ln -svf $MediaDepot/$i/$fj $Depot/$i/$fj > /dev/null + ln -sf $MediaDepot/$i/$fj $Depot/$i/$fj + echo -n -e "$PKGNB Paquets trouvés sur le média\r" done + echo "$PKGNB Paquets trouvés sur le média" cp $MediaDepot/$i/PKG* $Depot/$i/ fi done @@ -36,5 +55,4 @@ else do rsync -avuz --delete-before rsync://nutyx.meticul.eu/nutyx/attapu/i686/$i/ $Depot/$i/ done -fi - +fi |