pkg: support installing from local directories as well as remote URLs; PKG_PATH -> pkgpath
This commit is contained in:
parent
25e6361993
commit
55852fa53a
2 changed files with 13 additions and 6 deletions
|
@ -1,7 +1,7 @@
|
|||
#!/bin/rc -e
|
||||
|
||||
if(~ $#PKG_PATH 0)
|
||||
PKG_PATH=http://pkg.violetti.org
|
||||
if(~ $#pkgpath 0)
|
||||
pkgpath=http://pkg.violetti.org/$cputype
|
||||
|
||||
cd /
|
||||
mkdir -p /sys/lib/pkg
|
||||
|
@ -10,6 +10,10 @@ if (test -s /sys/lib/pkg/$1) {
|
|||
exit
|
||||
}
|
||||
echo Installing $1
|
||||
hget $PKG_PATH/$cputype/$1.tbz | bunzip2 | pkg/unpkg>[2]/sys/lib/pkg/$1
|
||||
if(~ $pkgpath ftp* http*)
|
||||
cmd=hget
|
||||
if not
|
||||
cmd=cat
|
||||
$cmd $pkgpath/$1.tbz | bunzip2 | pkg/unpkg>[2]/sys/lib/pkg/$1
|
||||
echo Done
|
||||
|
||||
|
|
|
@ -1,6 +1,9 @@
|
|||
#!/bin/rc
|
||||
|
||||
if(~ $#PKG_PATH 0)
|
||||
PKG_PATH=http://pkg.violetti.org
|
||||
if(~ $#pkgpath 0)
|
||||
pkgpath=http://pkg.violetti.org/$cputype
|
||||
|
||||
hget $PKG_PATH/$cputype | htmlfmt | grep '\.tbz' | sed -e 's/\.tbz$//'
|
||||
if(~ $pkgpath ftp* http*)
|
||||
hget $pkgpath | htmlfmt | grep '\.tbz' | sed -e 's/\.tbz$//'
|
||||
if not
|
||||
ls -p $pkgpath
|
||||
|
|
Loading…
Reference in a new issue