Experimental package creation tool for MinGW.org
リビジョン | 4048d0425a74b318ebe2db421910cb4311d2a319 (tree) |
---|---|
日時 | 2018-10-31 18:04:02 |
作者 | Keith Marshall <keith@user...> |
コミッター | Keith Marshall |
Add a verbose mode progress reporting option.
* src/modules/options.sh (option_verbose): Define it; it sets...
(OPTION_VERBOSE): ...this shell variable with value of "true".
* src/modules/pkgspec.sh (COMPRESS_CMD) [OPTION_VERBOSE]: Use it.
* src/modules/help.sh (help_options): Document it.
@@ -56,7 +56,7 @@ | ||
56 | 56 | --licence Display the $cmd licence, and exit. |
57 | 57 | --license A synonym for "--licence". |
58 | 58 | |
59 | - --version Display the $cmd version, and exit. | |
59 | + -V, --version Display the $cmd version, and exit. | |
60 | 60 | |
61 | 61 | --srcdir=path Specify the relative path from the build directory |
62 | 62 | to the package source tree; this becomes a "sticky" |
@@ -81,6 +81,10 @@ | ||
81 | 81 | --pre-staged When creating a distributable package set, do not |
82 | 82 | run an "install" step, to refresh the staged image. |
83 | 83 | |
84 | + -v, --verbose Make diagnostic output more verbose; currently, | |
85 | + this only enables progress reporting, when creating | |
86 | + distributable package sets in lzma or xz format. | |
87 | + | |
84 | 88 | -c, --stdout Direct output from the "mkspec" action to standard |
85 | 89 | output, rather than creating or overwriting the |
86 | 90 | default package specification file. |
@@ -36,13 +36,16 @@ | ||
36 | 36 | optdefine h help optional_argument |
37 | 37 | opteval_help(){ require module help $optarg; } |
38 | 38 | |
39 | - optdefine version | |
39 | + optdefine V version | |
40 | 40 | opteval_version(){ require module licence short; } |
41 | 41 | |
42 | 42 | optdefine licence |
43 | 43 | optalias license=licence |
44 | 44 | opteval_licence(){ require module licence full; } |
45 | 45 | |
46 | + optdefine v verbose | |
47 | + opteval_verbose(){ OPTION_VERBOSE=true; } | |
48 | + | |
46 | 49 | optdefine c stdout |
47 | 50 | opteval_stdout(){ OUTPUT_STREAMING_OPTION=stdout; } |
48 | 51 |
@@ -99,11 +99,11 @@ | ||
99 | 99 | ARCHIVE_CMD="tar" |
100 | 100 | case $1 in .*) PKGEXT="$1" ;; *) PKGEXT=".$1" ;; esac |
101 | 101 | case $PKGEXT in |
102 | - .tar ) COMPRESS_CMD="none" ;; | |
103 | - .tgz | .tar.gz ) COMPRESS_CMD="gzip" ;; | |
104 | - .tar.bz2 ) COMPRESS_CMD="bzip2" ;; | |
105 | - .tar.lzma ) COMPRESS_CMD="lzma" ;; | |
106 | - .tar.xz ) COMPRESS_CMD="xz" ;; | |
102 | + .tar ) COMPRESS_CMD="none" ;; | |
103 | + .tgz | .tar.gz ) COMPRESS_CMD="gzip" ;; | |
104 | + .tar.bz2 ) COMPRESS_CMD="bzip2" ;; | |
105 | + .tar.lzma ) COMPRESS_CMD="lzma ${OPTION_VERBOSE+-v}" ;; | |
106 | + .tar.xz ) COMPRESS_CMD="xz ${OPTION_VERBOSE+-v}" ;; | |
107 | 107 | |
108 | 108 | *) warning "unknown package type '$1'; reverting to '.tar.gz'" |
109 | 109 | COMPRESS_CMD="gzip" PKGEXT=".tar.gz" |