[Rear-users] SF.net SVN: rear:[582] trunk/usr

Schlomo Schapiro schlomo at schapiro.org
Sun Jun 19 12:57:23 CEST 2011


Do we really want rear help and rear -v help to be different? I am not sure that
this is typical behaviour for Unix software, rather the opposite. I guess that
most users won't even get the idea to do rear -v help (I would not) because
mostly one does only rear --help in any case.

On 08/06/11 11:08, dag- at users.sourceforge.net wrote:
> Revision: 582
>           http://rear.svn.sourceforge.net/rear/?rev=582&view=rev
> Author:   dag-
> Date:     2011-06-08 09:08:20 +0000 (Wed, 08 Jun 2011)
> 
> Log Message:
> -----------
> - Improve workflow descriptions
> - Improve help output (fits in 80 columns, no version output)
> - Show less workflows in help workflow (-v for all workflows)
> - Remove -q option
> 
> Modified Paths:
> --------------
>     trunk/usr/sbin/rear
>     trunk/usr/share/rear/lib/checklayout-workflow.sh
>     trunk/usr/share/rear/lib/dump-workflow.sh
>     trunk/usr/share/rear/lib/help-workflow.sh
>     trunk/usr/share/rear/lib/label-workflow.sh
>     trunk/usr/share/rear/lib/labeltape-workflow.sh
>     trunk/usr/share/rear/lib/mkbackup-workflow.sh
>     trunk/usr/share/rear/lib/mkbackuponly-workflow.sh
>     trunk/usr/share/rear/lib/mkdeb-workflow.sh
>     trunk/usr/share/rear/lib/mkdist-workflow.sh
>     trunk/usr/share/rear/lib/mkrescue-workflow.sh
>     trunk/usr/share/rear/lib/mkrpm-workflow.sh
>     trunk/usr/share/rear/lib/mktar-workflow.sh
>     trunk/usr/share/rear/lib/mkvendorrpm-workflow.sh
>     trunk/usr/share/rear/lib/recover-workflow.sh
>     trunk/usr/share/rear/lib/savelayout-workflow.sh
>     trunk/usr/share/rear/lib/shell-workflow.sh
>     trunk/usr/share/rear/lib/udev-workflow.sh
>     trunk/usr/share/rear/lib/validate-workflow.sh
> 
> Modified: trunk/usr/sbin/rear
> ===================================================================
> --- trunk/usr/sbin/rear	2011-06-08 08:25:36 UTC (rev 581)
> +++ trunk/usr/sbin/rear	2011-06-08 09:08:20 UTC (rev 582)
> @@ -92,7 +92,7 @@
>  
>  # the following workflows are always verbose
>  case "$WORKFLOW" in
> -	(validate|help|dump|mkdist|mktar|mk*rpm|mkdeb|shell|recover)
> +	(validate|dump|mkdist|mktar|mk*rpm|mkdeb|shell|recover)
>  		VERBOSE=1
>  	;;
>  esac
> @@ -148,11 +148,14 @@
>  test -r "$LOGFILE" && mv -f "$LOGFILE" "$LOGFILE".old 2>/dev/null # keep old log file
>  exec 2>"$LOGFILE" || echo "ERROR: Could not create $LOGFILE" 1>&2
>  
> -LogPrint "$PRODUCT Version $VERSION / $RELEASE_DATE"
> -Log "Command line options: $0 ${CMD_OPTS[@]}"
> +case "$WORKFLOW" in
> +	(help) ;;
> +	(*)
> +		LogPrint "$PRODUCT Version $VERSION / $RELEASE_DATE"
> +		Log "Command line options: $0 ${CMD_OPTS[@]}"
> +		;;
> +esac
>  
> -
> -
>  v=""
>  verbose=""
>  # enable progress subsystem only in verbose mode, set some stuff that others can use
> 
> Modified: trunk/usr/share/rear/lib/checklayout-workflow.sh
> ===================================================================
> --- trunk/usr/share/rear/lib/checklayout-workflow.sh	2011-06-08 08:25:36 UTC (rev 581)
> +++ trunk/usr/share/rear/lib/checklayout-workflow.sh	2011-06-08 09:08:20 UTC (rev 582)
> @@ -18,7 +18,7 @@
>  #
>  #
>  
> -WORKFLOW_checklayout_DESCRIPTION="Check if the disk layout has changed since the last run of savelayout."
> +WORKFLOW_checklayout_DESCRIPTION="check if the disk layout has changed"
>  WORKFLOWS=( ${WORKFLOWS[@]} checklayout )
>  LOCKLESS_WORKFLOWS=( ${LOCKLESS_WORKFLOWS[@]} checklayout )
>  WORKFLOW_checklayout () {
> 
> Modified: trunk/usr/share/rear/lib/dump-workflow.sh
> ===================================================================
> --- trunk/usr/share/rear/lib/dump-workflow.sh	2011-06-08 08:25:36 UTC (rev 581)
> +++ trunk/usr/share/rear/lib/dump-workflow.sh	2011-06-08 09:08:20 UTC (rev 582)
> @@ -18,7 +18,7 @@
>  #
>  #
>  
> -WORKFLOW_dump_DESCRIPTION="Dump configuration and system information"
> +WORKFLOW_dump_DESCRIPTION="dump configuration and system information"
>  WORKFLOWS=( ${WORKFLOWS[@]} dump )
>  WORKFLOW_dump () {
>  	LogPrint "Dumping out configuration and system information"
> 
> Modified: trunk/usr/share/rear/lib/help-workflow.sh
> ===================================================================
> --- trunk/usr/share/rear/lib/help-workflow.sh	2011-06-08 08:25:36 UTC (rev 581)
> +++ trunk/usr/share/rear/lib/help-workflow.sh	2011-06-08 09:08:20 UTC (rev 582)
> @@ -21,30 +21,31 @@
>  LOCKLESS_WORKFLOWS=( ${LOCKLESS_WORKFLOWS[@]} help )
>  WORKFLOW_help () {
>  	cat <<EOF
> -$SCRIPT_FILE [Options] <command> [command options ...]
> -$COPYRIGHT
> -$PRODUCT comes with ABSOLUTELY NO WARRANTY; for details 
> +Usage: ${SCRIPT_FILE##*/} [-d] [-D] [-r KERNEL] [-s] [-S] [-v] [-V] COMMAND [ARGS...]
> +
> +$PRODUCT comes with ABSOLUTELY NO WARRANTY; for details
>  see the GNU General Public License at http://www.gnu.org/licenses/gpl.html
>  
> -Available Options:
> --V                      version information
> --v                      verbose mode
> --d                      debug mode
> --D                      debugscript mode
> --S                      Step-by-step mode
> --s                      Simulation mode (shows the scripts included)
> --q                      Quiet mode
> --r a.b.c-xx-yy          kernel version to use (current: '"$KERNEL_VERSION"')
> +Available options:
> + -d           debug mode; log debug messages
> + -D           debugscript mode; log every function call
> + -r KERNEL    kernel version to use; current: '$KERNEL_VERSION'
> + -s           simulation mode; show what scripts rear would include
> + -S           step-by-step mode; acknowledge each script individually
> + -v           verbose mode; show more output
> + -V           version information
>  
>  List of commands:
>  $(
> -for w in ${WORKFLOWS[@]} ; do
> -	        description=WORKFLOW_${w}_DESCRIPTION
> -		        test "${!description}" && printf "%-24s%s\n" $w "${!description}"
> -		done
> +	for workflow in ${WORKFLOWS[@]} ; do
> +		description=WORKFLOW_${workflow}_DESCRIPTION
> +		if [[ "${!description}" ]]; then
> +			 printf " %-16s%s\n" $workflow "${!description}"
> +		fi
> +	done
>  )
>  
> -The $PRODUCT logfile is ${LOGFILE%%.lockless}
> +The logfile is ${LOGFILE%%.lockless}
>  EOF
>  	EXIT_CODE=1
>  }
> 
> Modified: trunk/usr/share/rear/lib/label-workflow.sh
> ===================================================================
> --- trunk/usr/share/rear/lib/label-workflow.sh	2011-06-08 08:25:36 UTC (rev 581)
> +++ trunk/usr/share/rear/lib/label-workflow.sh	2011-06-08 09:08:20 UTC (rev 582)
> @@ -1,7 +1,7 @@
>  # label-workflow.sh
>  #
>  
> -WORKFLOW_label_DESCRIPTION="Label tape for OBDR or USB device used in ReaR."
> +WORKFLOW_label_DESCRIPTION="format and label media for use with rear"
>  WORKFLOWS=( ${WORKFLOWS[@]} label )
>  WORKFLOW_label () {
>  	for arg in "${ARGS[@]}" ; do
> 
> Modified: trunk/usr/share/rear/lib/labeltape-workflow.sh
> ===================================================================
> --- trunk/usr/share/rear/lib/labeltape-workflow.sh	2011-06-08 08:25:36 UTC (rev 581)
> +++ trunk/usr/share/rear/lib/labeltape-workflow.sh	2011-06-08 09:08:20 UTC (rev 582)
> @@ -1,7 +1,7 @@
>  # labeltape-workflow.sh
>  #
>  
> -WORKFLOW_labeltape_DESCRIPTION="Label tape for OBDR use in ReaR."
> +WORKFLOW_labeltape_DESCRIPTION="format and label tape for use with rear"
>  WORKFLOWS=( ${WORKFLOWS[@]} labeltape )
>  WORKFLOW_labeltape () {
>  	for arg in "${ARGS[@]}" ; do
> 
> Modified: trunk/usr/share/rear/lib/mkbackup-workflow.sh
> ===================================================================
> --- trunk/usr/share/rear/lib/mkbackup-workflow.sh	2011-06-08 08:25:36 UTC (rev 581)
> +++ trunk/usr/share/rear/lib/mkbackup-workflow.sh	2011-06-08 09:08:20 UTC (rev 582)
> @@ -1,7 +1,9 @@
>  # mkbackup-workflow.sh
>  #
>  
> -WORKFLOW_mkbackup_DESCRIPTION="Create rescue media and backup system."
> +if [[ "$VERBOSE" ]]; then
> +    WORKFLOW_mkbackup_DESCRIPTION="create rescue media and backup system"
> +fi
>  WORKFLOWS=( ${WORKFLOWS[@]} mkbackup )
>  WORKFLOW_mkbackup () {
>  	for arg in "${ARGS[@]}" ; do
> 
> Modified: trunk/usr/share/rear/lib/mkbackuponly-workflow.sh
> ===================================================================
> --- trunk/usr/share/rear/lib/mkbackuponly-workflow.sh	2011-06-08 08:25:36 UTC (rev 581)
> +++ trunk/usr/share/rear/lib/mkbackuponly-workflow.sh	2011-06-08 09:08:20 UTC (rev 582)
> @@ -1,7 +1,7 @@
>  # mkbackup-workflow.sh
>  #
>  
> -WORKFLOW_mkbackuponly_DESCRIPTION="Backup system without creating a (new) rescue media."
> +WORKFLOW_mkbackuponly_DESCRIPTION="backup system without creating rescue media"
>  WORKFLOWS=( ${WORKFLOWS[@]} mkbackuponly )
>  WORKFLOW_mkbackuponly () {
>  	for arg in "${ARGS[@]}" ; do
> 
> Modified: trunk/usr/share/rear/lib/mkdeb-workflow.sh
> ===================================================================
> --- trunk/usr/share/rear/lib/mkdeb-workflow.sh	2011-06-08 08:25:36 UTC (rev 581)
> +++ trunk/usr/share/rear/lib/mkdeb-workflow.sh	2011-06-08 09:08:20 UTC (rev 582)
> @@ -4,7 +4,9 @@
>  # create DEB files of rear
>  #
>  
> -WORKFLOW_mkdeb_DESCRIPTION="Create DEB packages with this rear version"
> +if [[ "$VERBOSE" ]]; then
> +    WORKFLOW_mkdeb_DESCRIPTION="create debian packages using installed rear"
> +fi
>  WORKFLOWS=( ${WORKFLOWS[@]} mkdeb )
>  WORKFLOW_mkdeb () {
>  
> 
> Modified: trunk/usr/share/rear/lib/mkdist-workflow.sh
> ===================================================================
> --- trunk/usr/share/rear/lib/mkdist-workflow.sh	2011-06-08 08:25:36 UTC (rev 581)
> +++ trunk/usr/share/rear/lib/mkdist-workflow.sh	2011-06-08 09:08:20 UTC (rev 582)
> @@ -4,7 +4,9 @@
>  # create distribution files of rear
>  #
>  
> -WORKFLOW_mkdist_DESCRIPTION="Create distribution tar archive with this rear version"
> +if [[ "$VERBOSE" ]]; then
> +    WORKFLOW_mkdist_DESCRIPTION="create tar archive using installed rear"
> +fi
>  WORKFLOWS=( ${WORKFLOWS[@]} mkdist )
>  
>  WORKFLOW_mkdist_postprocess () {
> 
> Modified: trunk/usr/share/rear/lib/mkrescue-workflow.sh
> ===================================================================
> --- trunk/usr/share/rear/lib/mkrescue-workflow.sh	2011-06-08 08:25:36 UTC (rev 581)
> +++ trunk/usr/share/rear/lib/mkrescue-workflow.sh	2011-06-08 09:08:20 UTC (rev 582)
> @@ -18,7 +18,7 @@
>  #
>  #
>  
> -WORKFLOW_mkrescue_DESCRIPTION="Create rescue media only"
> +WORKFLOW_mkrescue_DESCRIPTION="create rescue media only"
>  WORKFLOWS=( ${WORKFLOWS[@]} mkrescue )
>  WORKFLOW_mkrescue () {
>  	for arg in "${ARGS[@]}" ; do
> 
> Modified: trunk/usr/share/rear/lib/mkrpm-workflow.sh
> ===================================================================
> --- trunk/usr/share/rear/lib/mkrpm-workflow.sh	2011-06-08 08:25:36 UTC (rev 581)
> +++ trunk/usr/share/rear/lib/mkrpm-workflow.sh	2011-06-08 09:08:20 UTC (rev 582)
> @@ -4,7 +4,9 @@
>  # create RPM files of rear
>  #
>  
> -WORKFLOW_mkrpm_DESCRIPTION="Create RPM packages with this rear version"
> +if [[ "$VERBOSE" ]]; then
> +    WORKFLOW_mkrpm_DESCRIPTION="create rpm packages using installed rear"
> +fi
>  WORKFLOWS=( ${WORKFLOWS[@]} mkrpm )
>  WORKFLOW_mkrpm () {
>  
> 
> Modified: trunk/usr/share/rear/lib/mktar-workflow.sh
> ===================================================================
> --- trunk/usr/share/rear/lib/mktar-workflow.sh	2011-06-08 08:25:36 UTC (rev 581)
> +++ trunk/usr/share/rear/lib/mktar-workflow.sh	2011-06-08 09:08:20 UTC (rev 582)
> @@ -18,7 +18,9 @@
>  #
>  #
>  
> -WORKFLOW_mktar_DESCRIPTION="Create tar archive with this rear installation"
> +if [[ "$VERBOSE" ]]; then
> +    WORKFLOW_mktar_DESCRIPTION="create tar archive using installed rear"
> +fi
>  WORKFLOWS=( ${WORKFLOWS[@]} mktar )
>  WORKFLOW_mktar () {
>  	
> 
> Modified: trunk/usr/share/rear/lib/mkvendorrpm-workflow.sh
> ===================================================================
> --- trunk/usr/share/rear/lib/mkvendorrpm-workflow.sh	2011-06-08 08:25:36 UTC (rev 581)
> +++ trunk/usr/share/rear/lib/mkvendorrpm-workflow.sh	2011-06-08 09:08:20 UTC (rev 582)
> @@ -4,7 +4,9 @@
>  # create distribution files of rear
>  #
>  
> -WORKFLOW_mkvendorrpm_DESCRIPTION="Create vendor RPM with this rear version"
> +if [[ "$VERBOSE" ]]; then
> +    WORKFLOW_mkvendorrpm_DESCRIPTION="create vendor rpm package using installed rear"
> +fi
>  WORKFLOWS=( ${WORKFLOWS[@]} mkvendorrpm )
>  WORKFLOW_mkvendorrpm () {
>  
> 
> Modified: trunk/usr/share/rear/lib/recover-workflow.sh
> ===================================================================
> --- trunk/usr/share/rear/lib/recover-workflow.sh	2011-06-08 08:25:36 UTC (rev 581)
> +++ trunk/usr/share/rear/lib/recover-workflow.sh	2011-06-08 09:08:20 UTC (rev 582)
> @@ -18,7 +18,7 @@
>  #
>  #
>  
> -WORKFLOW_recover_DESCRIPTION="Recover the system"
> +WORKFLOW_recover_DESCRIPTION="recover the system; only valid during rescue"
>  WORKFLOWS=( ${WORKFLOWS[@]} recover )
>  WORKFLOW_recover () {
>  	
> 
> Modified: trunk/usr/share/rear/lib/savelayout-workflow.sh
> ===================================================================
> --- trunk/usr/share/rear/lib/savelayout-workflow.sh	2011-06-08 08:25:36 UTC (rev 581)
> +++ trunk/usr/share/rear/lib/savelayout-workflow.sh	2011-06-08 09:08:20 UTC (rev 582)
> @@ -18,7 +18,9 @@
>  #
>  #
>  
> -WORKFLOW_savelayout_DESCRIPTION="Save the disk layout of the system."
> +if [[ "$VERBOSE" ]]; then
> +    WORKFLOW_savelayout_DESCRIPTION="save the disk layout of the system"
> +fi
>  WORKFLOWS=( ${WORKFLOWS[@]} savelayout )
>  WORKFLOW_savelayout () {
>      DISKLAYOUT_FILE=$VAR_DIR/layout/disklayout.conf
> 
> Modified: trunk/usr/share/rear/lib/shell-workflow.sh
> ===================================================================
> --- trunk/usr/share/rear/lib/shell-workflow.sh	2011-06-08 08:25:36 UTC (rev 581)
> +++ trunk/usr/share/rear/lib/shell-workflow.sh	2011-06-08 09:08:20 UTC (rev 582)
> @@ -1,5 +1,7 @@
> -WORKFLOW_shell_DESCRIPTION="Start a Bash within ReaR (development tool)"
> -WORKFLOWS=( "${WORKFLOWS[@]}" shell )                                           
> +if [[ "$VERBOSE" ]]; then
> +    WORKFLOW_shell_DESCRIPTION="start a bash within rear; development tool"
> +fi
> +WORKFLOWS=( "${WORKFLOWS[@]}" shell )
>  WORKFLOW_shell () {
>  	for arg in "${ARGS[@]}" ; do
>  		key=OPT_"${arg%%=*}"
> 
> Modified: trunk/usr/share/rear/lib/udev-workflow.sh
> ===================================================================
> --- trunk/usr/share/rear/lib/udev-workflow.sh	2011-06-08 08:25:36 UTC (rev 581)
> +++ trunk/usr/share/rear/lib/udev-workflow.sh	2011-06-08 09:08:20 UTC (rev 582)
> @@ -18,7 +18,9 @@
>  #
>  #
>  
> -WORKFLOW_udev_DESCRIPTION="Udev handler"
> +if [[ "$VERBOSE" ]]; then
> +    WORKFLOW_udev_DESCRIPTION="udev handler; triggered by udev rule"
> +fi
>  WORKFLOWS=( ${WORKFLOWS[@]} udev )
>  WORKFLOW_udev () {
>      # If no udev workflow has been defined, exit cleanly
> 
> Modified: trunk/usr/share/rear/lib/validate-workflow.sh
> ===================================================================
> --- trunk/usr/share/rear/lib/validate-workflow.sh	2011-06-08 08:25:36 UTC (rev 581)
> +++ trunk/usr/share/rear/lib/validate-workflow.sh	2011-06-08 09:08:20 UTC (rev 582)
> @@ -20,7 +20,7 @@
>  #
>  #
>  
> -WORKFLOW_validate_DESCRIPTION="Submit validation information"
> +WORKFLOW_validate_DESCRIPTION="submit validation information"
>  WORKFLOWS=( ${WORKFLOWS[@]} validate )
>  WORKFLOW_validate () {
>  
> @@ -29,7 +29,7 @@
>  willingness to report about $PRODUCT in your environment back to us.
>  	
>  This kind of user support is greatly appreciated and helps a lot to
> -improve $PRODUCT.                      
> +improve $PRODUCT.
>  
>  --- Schlomo Schapiro
>  
> 
> 
> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
> 
> ------------------------------------------------------------------------------
> EditLive Enterprise is the world's most technically advanced content
> authoring tool. Experience the power of Track Changes, Inline Image
> Editing and ensure content is compliant with Accessibility Checking.
> http://p.sf.net/sfu/ephox-dev2dev
> _______________________________________________
> Rear-users mailing list
> Rear-users at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/rear-users




More information about the rear-users mailing list