summaryrefslogtreecommitdiffstats
path: root/base/pkg-get/pkg-get.awk
diff options
context:
space:
mode:
Diffstat (limited to 'base/pkg-get/pkg-get.awk')
-rwxr-xr-xbase/pkg-get/pkg-get.awk21
1 files changed, 11 insertions, 10 deletions
diff --git a/base/pkg-get/pkg-get.awk b/base/pkg-get/pkg-get.awk
index 1d0d4bb38..fd36a6aa2 100755
--- a/base/pkg-get/pkg-get.awk
+++ b/base/pkg-get/pkg-get.awk
@@ -13,8 +13,8 @@ function configs( a, i, k, n, old_FS)
{
n=split(ENVIRON["_"],a,"/")
NPKG = a[n]
- VERSION = "0.3.3"
- DATE = "2011-04-03"
+ VERSION = "0.3.4"
+ DATE = "2011-06-05"
# defauts
CONF = "/etc/pkg-get.conf"
@@ -27,6 +27,7 @@ function configs( a, i, k, n, old_FS)
load_NUTYX_VERSION()
"uname -p " | getline ENV; close("uname -p")
WEBDIR[0] = "http://nutyx.meticul.eu/" NUTYX_VERSION "/" ENV "/release/"
+ TIMEOUT = 30
# arguments
OPER=(ARGC>1) ? ARGV[1] : ""
@@ -129,7 +130,7 @@ function dependent( a, i, n)
{
load_RDEPS()
load_DB()
- n=split(tb_RDEPS[PKG],a,",")
+ n=split(tb_RDEPS[tb_PKG[1]],a,",")
for (i=1; i<=n; i++)
if ((a[i] in tb_DB) || ("--all" in tb_OPT))
print a[i]
@@ -237,7 +238,7 @@ function download(pak, a, WEBREPO, fnPak, cmd, rc, pakw)
if ((getline < fnPak) <=0) {
pakw = pak
sub("#", "%23", pakw)
- cmd="wget --no-directories --tries=3 --waitretry=3 -nv --directory-prefix="tb_PKGDIR[a[1]] " " WEBREPO pakw " >/dev/null 2>&1"
+ cmd="wget --no-directories --tries=3 --waitretry=3 -nv --connect-timeout=" TIMEOUT " --directory-prefix="tb_PKGDIR[a[1]] " " WEBREPO pakw " >/dev/null 2>&1"
if ("--dry" in tb_OPT) {
print " " cmd
return 8
@@ -726,15 +727,15 @@ function sync( cmd, i, j, pak, rc)
for (j=0; j<NPKGDIR; j++) {
if (WEBDIR[j] > "") {
for (i=1; i<=4; i++) {
- cmd="wget -q -O "PKGDIR[j] pak[i] " " WEBDIR[j] pak[i]
+ cmd="wget -q --connect-timeout=" TIMEOUT " -O "PKGDIR[j] pak[i] " " WEBDIR[j] pak[i]
if ("--dry" in tb_OPT) {
print "\033[1;34m" cmd "\033[1;0m"
} else {
- rc=system(cmd)
- if (rc>0) {
- print "ERREUR", rc
- exit 1
- }
+ rc=system(cmd)
+ if (rc>0) {
+ print "ERREUR", rc
+ exit 1
+ }
}
}
}