#!/usr/bin/perl -w # $prompt = "(pkg-demo ~) \$"; $prompt = "\$"; #-------------------------------------------------- sub command { printf ("$prompt "); system ("typer $cmd"); system(wait4enter); # system($cmd); printf("$prompt ") ; system(wait4enter); } #-------------------------------------------------- # main system(clear); $cmd = "pkg help"; command(); system(clear); $cmd = "pkg search zfs"; command(); system(clear); $cmd = "pkg list SUNWzfs"; command(); system(echo); $cmd = "pkg info SUNWzfs"; command(); system(echo); $cmd = "pkg contents -t dir,file,link,hardlink -o action.name,mode,pkg.size,path,target SUNWzfs"; command(); system(clear); $cmd = "which gcc"; command(); system(echo); $cmd = "pkg search -r gcc"; command(); system(echo); $cmd = "pkg info -r gcc-dev"; command(); system(echo); $cmd = "pfexec pkg refresh"; command(); system(echo); $cmd = "pfexec pkg install -v gcc-dev"; command(); system(echo); $cmd = "which gcc"; command(); system(clear); $cmd = "pkg search -r emacs"; command(); system(echo); $cmd = "pfexec pkg set-authority -O http://pkg.sunfreeware.com:9000 sunfreeware.com"; command(); system(echo); $cmd = "pkg authority"; command(); system(echo); $cmd = "pfexec pkg refresh"; command(); system(echo); $cmd = "pkg search -r emacs"; command(); system(clear); $cmd = "cd ws/hello-world"; command(); system(echo); $cmd = "cat src/hello-world.c"; command(); system(echo); $cmd = "gcc -o bin/hello-world src/hello-world.c"; command(); system(echo); $cmd = "bin/hello-world"; command(); system(clear); $cmd = "svcs pkg/server"; command(); system(echo); $cmd = "svcadm enable pkg/server"; command(); system(clear); $cmd = "cat pkgsend-script"; command(); #--------------------------------------------------