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.awk23
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"