pkg: add pkg/local, $PKG_PATH

This commit is contained in:
stanley lieber 2011-05-15 04:12:49 +00:00
parent e17a2a9e89
commit 75ccd88e99
3 changed files with 11 additions and 2 deletions

View file

@ -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 @@ if (test -s /sys/lib/pkg/$1) {
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

View file

@ -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$//'

3
sys/src/cmd/pkg/local Executable file
View file

@ -0,0 +1,3 @@
#!/bin/rc
ls -p /sys/lib/pkg