Do-solaris-pkg:

  Deposit the new .pkg.gz into the ~/$hostname/ directory
parent 91ba515e
...@@ -3,6 +3,7 @@ ...@@ -3,6 +3,7 @@
# Script to create Solaris packages # Script to create Solaris packages
# #
$INTERACTIVE= 0; $INTERACTIVE= 0;
$hostname= `hostname`;
$find = "/usr/bin/find"; $find = "/usr/bin/find";
$pkgproto = "/usr/bin/pkgproto"; $pkgproto = "/usr/bin/pkgproto";
$pkgmk = "/usr/bin/pkgmk -o"; $pkgmk = "/usr/bin/pkgmk -o";
...@@ -19,7 +20,7 @@ $fullname or die "No package name was specified"; ...@@ -19,7 +20,7 @@ $fullname or die "No package name was specified";
$fullname =~ s,/+$,,; # Remove ending slash if any $fullname =~ s,/+$,,; # Remove ending slash if any
$pkgdir = `cd ../pkgs; pwd`; $pkgdir= `cd ../$hostname; pwd`;
$pwd = `pwd`; $pwd = `pwd`;
if ($pwd =~ '\/usr\/local') { if ($pwd =~ '\/usr\/local') {
$pwd = $`; $pwd = $`;
...@@ -74,7 +75,7 @@ $os =~ '\.'; ...@@ -74,7 +75,7 @@ $os =~ '\.';
$os = "sol$'"; $os = "sol$'";
chomp $os; chomp $os;
$default{"basedir"}= "/usr/local"; $default{"basedir"}= "/usr/local";
$default{"packagename"}= $fullname; $default{"packagename"}= $fullname . '.pkg';
# Check for correctness of guessed values by userinput # Check for correctness of guessed values by userinput
...@@ -138,7 +139,7 @@ system ("(cd /var/spool/pkg; rm -rf $pkg)"); ...@@ -138,7 +139,7 @@ system ("(cd /var/spool/pkg; rm -rf $pkg)");
unlink $pkginfo; unlink $pkginfo;
unlink $prototype; unlink $prototype;
system ("mv /tmp/${packagename}.gz $pkgdir"); system ("mv /tmp/${packagename}.gz $pkgdir");
print "Done. (~/packaging/pkgs/$packagename.gz)\n"; print "Done. (~/$hostname/$packagename.gz)\n";
# The subroutines # The subroutines
sub chkvar { sub chkvar {
print "\n"; print "\n";
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment