shithub: riscv

Download patch

ref: 75ccd88e99e0f03d19c3aadb2d3accf1b1e161cb
parent: e17a2a9e8966acc3d965678c6f24a11ac2315abc
author: stanley lieber <[email protected]>
date: Sun May 15 00:12:49 EDT 2011

pkg: add pkg/local, $PKG_PATH

--- a/sys/src/cmd/pkg/install
+++ b/sys/src/cmd/pkg/install
@@ -1,5 +1,8 @@
 #!/bin/rc -e
 
+if(~ $#PKG_PATH 0)
+	PKG_PATH=http://pkg.violetti.org
+
 cd /
 mkdir -p /sys/lib/pkg
 if (test -s /sys/lib/pkg/$1) {
@@ -7,6 +10,6 @@
 	exit
 }
 echo Installing $1
-hget http://pkg.violetti.org/$cputype/$1.tbz | bunzip2 | pkg/unpkg>[2]/sys/lib/pkg/$1
+hget $PKG_PATH/$cputype/$1.tbz | bunzip2 | pkg/unpkg>[2]/sys/lib/pkg/$1
 echo Done
 
--- a/sys/src/cmd/pkg/list
+++ b/sys/src/cmd/pkg/list
@@ -1,3 +1,6 @@
 #!/bin/rc
 
-hget http://pkg.violetti.org/$cputype | htmlfmt | grep '\.tbz' | sed -e 's/\.tbz$//'
+if(~ $#PKG_PATH 0)
+	PKG_PATH=http://pkg.violetti.org
+
+hget $PKG_PATH/$cputype | htmlfmt | grep '\.tbz' | sed -e 's/\.tbz$//'
--- /dev/null
+++ b/sys/src/cmd/pkg/local
@@ -1,0 +1,3 @@
+#!/bin/rc
+
+ls -p /sys/lib/pkg