summaryrefslogtreecommitdiffstats
path: root/base/pkg-get/pkg-get.awk
diff options
context:
space:
mode:
authorguy_ <guy@NuTyX.(none)>2011-06-05 20:35:29 +0200
committerguy_ <guy@NuTyX.(none)>2011-06-05 20:35:29 +0200
commit66f14a5cfbdd39af994e0f1b45d7b569c3f67e1c (patch)
tree4795c30791b6b192d0be76c116ecbc175dcc02b6 /base/pkg-get/pkg-get.awk
parent42f7f7f7ad3cca1ca3c7fbe3b7a40dad2d7edb33 (diff)
downloadnutyx-extra-66f14a5cfbdd39af994e0f1b45d7b569c3f67e1c.tar.gz
nutyx-extra-66f14a5cfbdd39af994e0f1b45d7b569c3f67e1c.tar.bz2
nutyx-extra-66f14a5cfbdd39af994e0f1b45d7b569c3f67e1c.tar.xz
nutyx-extra-66f14a5cfbdd39af994e0f1b45d7b569c3f67e1c.zip
pkg-get.awk 0.3.4 corrections de bugs
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
+ }
}
}
}