ref: 072c45d4633d5f03e3b79f9c60c3655a6d4a1149
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