Przeglądaj źródła

add rpmtool msg command

Ralf S. Engelschall 23 lat temu
rodzic
commit
f0d9667d19
4 zmienionych plików z 35 dodań i 8 usunięć
  1. 2 2
      openpkg/openpkg.spec
  2. 20 1
      openpkg/rpmtool
  3. 8 5
      openpkg/rpmtool.8
  4. 5 0
      openpkg/rpmtool.pod

+ 2 - 2
openpkg/openpkg.spec

@@ -39,8 +39,8 @@
 #   o any cc(1)
 
 #   the package version and release
-%define       V_openpkg 20020408
-%define       R_openpkg 20020408
+%define       V_openpkg 20020412
+%define       R_openpkg 20020412
 
 #   the used software versions
 %define       V_rpm     4.0.2

+ 20 - 1
openpkg/rpmtool

@@ -54,6 +54,7 @@ if [ ".$1" = ".-h" -o ".$1" = ".--help" ]; then
     echo '  group  [-c] [-d] <groupname> <min-gid> [<username> ...]'
     echo '  signal [-v] [-t] [-n] [-c] [-d <delay>] [-p <pid>] [-m <pattern>] <sig> [<sig> ...]'
     echo '  config [-v] [-s] [-a] [-r] [-b <ext>] [-p <tagprefix>] [-t <tagname>] [-i <tagid>] <file>'
+    echo '  msg    [-b]'
     echo ''
     exit 0
 fi
@@ -151,7 +152,12 @@ case $tool in
         opt_i=""
         gen_tmpfile=yes
         ;;
-
+    msg )
+        str_usage="[-b]"
+        arg_spec="0="
+        opt_spec="b."
+        opt_b=no
+        ;;
     -* )
         echo "$prog_name:Error: unknown option \`$tool'" 2>&1
         echo "$prog_name:Hint:  run \`$0 -h' for usage" 2>&1
@@ -1147,6 +1153,19 @@ EOT
             rm -f $configfile$ext
         fi
         ;;
+
+    msg )
+        #   optionally beep before message
+        if [ ".$opt_b" = .yes ]; then
+            echo . | awk '{ printf("%c", 7); }'
+        fi
+        
+        #   display message
+        echo . | awk '{ printf("\r"); }'
+        echo "+-----------------------------------------------------------------------------+"
+        expand -8 | sed -e 's; *$;;' | awk '{ printf("| %-75s |\n", substr($0, 0, 75)); }'
+        echo "+-----------------------------------------------------------------------------+"
+        ;;
 esac
 
 #   cleanup

+ 8 - 5
openpkg/rpmtool.8

@@ -1,5 +1,5 @@
 .\" Automatically generated by Pod::Man version 1.15
-.\" Mon Jan 28 17:12:44 2002
+.\" Fri Apr 12 12:11:06 2002
 .\"
 .\" Standard preamble:
 .\" ======================================================================
@@ -138,7 +138,7 @@
 .\" ======================================================================
 .\"
 .IX Title "RPMTOOL 1"
-.TH RPMTOOL 1 "perl v5.6.1" "2002-01-28" "User Contributed Perl Documentation"
+.TH RPMTOOL 1 "perl v5.6.1" "2002-04-12" "User Contributed Perl Documentation"
 .UC
 .SH "NAME"
 \&\fBrpmtool\fR \- \s-1RPM\s0 Auxiliary Tool
@@ -273,11 +273,14 @@ This adds (\fB\-a\fR) or removes (\fB\-r\fR) the user \fIusername\fR in the syst
 .Ip "\fBgroup\fR [\fB\-a\fR] [\fB\-r\fR] [\fB\-g\fR \fImin-gid\fR] \fIgroupname\fR [\fIusername\fR ...]" 4
 .IX Item "group [-a] [-r] [-g min-gid] groupname [username ...]"
 This adds (\fB\-a\fR) or removes (\fB\-r\fR) the group \fIgroupname\fR in the system database.
+.Ip "\fBmsg\fR [\fB\-b\fR]" 4
+.IX Item "msg [-b]"
+This displays the contents of \fIstdin\fR as a boxed message. If option
+\&\fB\-b\fR is given it additionally beeps once before displaying the box.
 .SH "HISTORY"
 .IX Header "HISTORY"
-This tool was created in November 2000 for use with the Portable
-RPM-based Unix Software Packages at Cable & Wireless Deutschland GmbH,
-Munich.
+This tool was created in November 2000 for use in OpenPKG, the
+cross-platform RPM-based Unix software packaging facility.
 .SH "AUTHOR"
 .IX Header "AUTHOR"
 .Vb 3

+ 5 - 0
openpkg/rpmtool.pod

@@ -165,6 +165,11 @@ This adds (B<-a>) or removes (B<-r>) the user I<username> in the system database
 
 This adds (B<-a>) or removes (B<-r>) the group I<groupname> in the system database.
 
+=item B<msg> [B<-b>]
+
+This displays the contents of F<stdin> as a boxed message. If option
+B<-b> is given it additionally beeps once before displaying the box.
+
 =back
 
 =head1 HISTORY