ref: dc501ae1e31dd4c9147f10e0d477ad0967777609
dir: /sys/src/cmd/pkg/install/
#!/bin/rc if(~ $#pkgpath 0) pkgpath=http://r-36.net/9front/pkg/$cputype cd / mkdir -p /sys/lib/pkg if (test -s /sys/lib/pkg/$1) { echo $1 already installed exit } echo Installing $1 if(~ $pkgpath ftp* http*) cmd=hget if not cmd=cat if(! $cmd $pkgpath/$1.tbz | bunzip2 | pkg/unpkg >/sys/lib/pkg/$1) if(! test -s /sys/lib/pkg/$1) rm -f /sys/lib/pkg/$1