summaryrefslogtreecommitdiffstats
path: root/base/pkg-get/syn
diff options
context:
space:
mode:
authorThierry N <thierryn1 at hispeed dot ch>2009-08-08 22:17:18 +0200
committerThierry N <thierryn1 at hispeed dot ch>2009-08-08 22:17:18 +0200
commitfbda6ec65f50014ab4e2c773c90992c2ff7f51b8 (patch)
tree41cadb408d9523add246a0225c1193b4907ce059 /base/pkg-get/syn
parentf302f5b8f38633e35758a625c2574bc186ee8476 (diff)
downloadnutyx-extra-fbda6ec65f50014ab4e2c773c90992c2ff7f51b8.tar.gz
nutyx-extra-fbda6ec65f50014ab4e2c773c90992c2ff7f51b8.tar.bz2
nutyx-extra-fbda6ec65f50014ab4e2c773c90992c2ff7f51b8.tar.xz
nutyx-extra-fbda6ec65f50014ab4e2c773c90992c2ff7f51b8.zip
Ajout de pkg-get#0.4.5-3
Diffstat (limited to 'base/pkg-get/syn')
-rw-r--r--base/pkg-get/syn33
1 files changed, 33 insertions, 0 deletions
diff --git a/base/pkg-get/syn b/base/pkg-get/syn
new file mode 100644
index 000000000..c4bdeb1fe
--- /dev/null
+++ b/base/pkg-get/syn
@@ -0,0 +1,33 @@
+#!/bin/bash
+MediaDepot=/media/cdrom/depot
+Depot=/srv/NuTyX
+if [ ! "$EUID" -eq 0 ]; then
+ echo "Seul le compte root peut synchroniser les ports NuTyX"
+ exit 1
+fi
+if [ ! -L /depot ]; then
+ pushd $Depot/locale > /dev/null
+ pkg-repgen
+ popd
+ for i in test stable
+ do
+ if [ -d $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
+ if [ -d $MediaDepot/$i ]; then
+ echo "Dépot $i trouvé sur le media"
+ rm -r $Depot/$i > /dev/null 2>&1
+ ln -svf $MediaDepot/$i $Depot/ > /dev/null
+ 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/2009/uname-m/$i/ $Depot/$i/
+ done
+fi
+