ref: e08cc065177138fe821abb84dc6381fd0400e944
dir: /sys/src/cmd/pkg/install/
#!/bin/rc if(~ $#pkgpath 0) pkgpath=http://9front.org/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