diff options
author | tnut <tnut at nutyx dot com> | 2011-06-16 21:08:23 +0200 |
---|---|---|
committer | tnut <tnut at nutyx dot com> | 2011-06-16 21:08:23 +0200 |
commit | c5e4c54f84ae8e1205c4ebd7ce75537c391d26a7 (patch) | |
tree | 678ddcd5965bc62c6f849e0cd6560234a986b3f9 /base/pkg-get/pkg-get.awk | |
parent | 8d7521df1e33c2308d3d9aacba335f528904bd94 (diff) | |
parent | 6838e6a1f9dcd1167fd853954fc69efc9710b205 (diff) | |
download | nutyx-pakxe-c5e4c54f84ae8e1205c4ebd7ce75537c391d26a7.tar.gz nutyx-pakxe-c5e4c54f84ae8e1205c4ebd7ce75537c391d26a7.tar.bz2 nutyx-pakxe-c5e4c54f84ae8e1205c4ebd7ce75537c391d26a7.tar.xz nutyx-pakxe-c5e4c54f84ae8e1205c4ebd7ce75537c391d26a7.zip |
Merge branch 'master' of ssh://kiao.no-ip.info:443/~/pakxe
Diffstat (limited to 'base/pkg-get/pkg-get.awk')
-rwxr-xr-x | base/pkg-get/pkg-get.awk | 23 |
1 files changed, 14 insertions, 9 deletions
diff --git a/base/pkg-get/pkg-get.awk b/base/pkg-get/pkg-get.awk index fd36a6aa2..bc0a1cec8 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.4" - DATE = "2011-06-05" + VERSION = "0.3.5" + DATE = "2011-06-15" # defauts CONF = "/etc/pkg-get.conf" @@ -256,15 +256,17 @@ function download(pak, a, WEBREPO, fnPak, cmd, rc, pakw) } -function dsearch( old_FS, j, FILE) +function dsearch( old_FS, j, FILE, trt) { old_FS = FS FS="[:#]" for (j=0; j<NPKGDIR; j++) { FILE=PKGDIR[j] REPO while ((getline < FILE) >0) { - if (index($1,ARGV[2]) || index($5,ARGV[2])) + if ( !($1 in trt) && (index($1,ARGV[2]) || index($5,ARGV[2]))) { print $1 + trt[$1]="y" + } } } close(FILE) @@ -444,16 +446,16 @@ function isinst() } -function list( old_FS, FILE, j, prev) +function list( old_FS, FILE, j, trt) { old_FS = FS FS="#" for (j=0; j<NPKGDIR; j++) { FILE = PKGDIR[j] REPO while ((getline < FILE) >0) { - if ($1 != prev) { + if (!($1 in trt)) { print $1 - prev = $1 + trt[$1]="y" } } close(FILE) @@ -700,15 +702,17 @@ function readme( fl, j, FILE) } -function search( j, FILE, old_FS) +function search( j, FILE, old_FS, trt) { old_FS = FS FS="[:#]" for (j=0; j<NPKGDIR; j++) { FILE=PKGDIR[j] REPO while ((getline < FILE) >0) { - if (index($1,ARGV[2])) + if (!($1 in trt) && index($1,ARGV[2])) { print $1 + trt[$1]="y" + } } close(FILE) } @@ -727,6 +731,7 @@ function sync( cmd, i, j, pak, rc) for (j=0; j<NPKGDIR; j++) { if (WEBDIR[j] > "") { for (i=1; i<=4; i++) { + print PKGDIR[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" |