diff options
author | chinarulezzz <s.alex08@mail.ru> | 2016-12-07 02:45:15 +0200 |
---|---|---|
committer | chinarulezzz <s.alex08@mail.ru> | 2016-12-07 02:45:15 +0200 |
commit | c313b2ba7c4d81d67b5cfb8691ac42ca3dfd5aca (patch) | |
tree | 5d7fa1ca7e3332429cc9946040e02f3cc374d097 | |
parent | 88b3d4dada94b96a036a2f1838b1213e04cfec5d (diff) | |
download | sbotools-c313b2ba7c4d81d67b5cfb8691ac42ca3dfd5aca.tar.xz |
sboclean: change options --clean-dist|--clean-work into simple --dist|--work
-rw-r--r-- | man1/sboclean.1 | 4 | ||||
-rwxr-xr-x | sboclean | 16 | ||||
-rwxr-xr-x | t/15-usage.t | 4 |
3 files changed, 12 insertions, 12 deletions
diff --git a/man1/sboclean.1 b/man1/sboclean.1 index a1a99ee..2e3bf2f 100644 --- a/man1/sboclean.1 +++ b/man1/sboclean.1 @@ -20,12 +20,12 @@ Show help information. Show version information. .RE .P --d|--clean-dist +-d|--dist .RS Clean distfiles, by default located at /usr/sbo/distfiles. .RE .P --w|--clean-work +-w|--work .RS Clean working directories, located, by default under /tmp/SBo and, for compat32 installs, by default, /tmp. .RE @@ -29,9 +29,9 @@ Options: this screen. -v|--version: version information. - -d|--clean-dist: + -d|--dist: clean distfiles. - -w|--clean-work: + -w|--work: clean working directories. -i|--interactive: be interactive. @@ -40,13 +40,13 @@ EOF return 1; } -my ($help, $vers, $clean_dist, $clean_work, $interactive); +my ($help, $vers, $dist, $work, $interactive); GetOptions( 'help|h' => \$help, 'version|v' => \$vers, - 'clean-dist|d' => \$clean_dist, - 'clean-work|w' => \$clean_work, + 'dist|d' => \$dist, + 'work|w' => \$work, 'interactive|i' => \$interactive, ); @@ -54,7 +54,7 @@ if ($help) { show_usage(); exit 0 } if ($vers) { show_version(); exit 0 } usage_error("You must specify at least one of -d or -w.") unless - ($clean_dist || $clean_work); + ($dist || $work); sub rm_full { script_error('rm_full requires an argument.') unless @_ == 1; @@ -92,9 +92,9 @@ sub clean_c32 { return 1; } -remove_stuff($config{SBO_HOME} .'/distfiles') if $clean_dist; +remove_stuff($config{SBO_HOME} .'/distfiles') if $dist; -if ($clean_work) { +if ($work) { my $env_tmp = $SBO::Lib::env_tmp; my $tsbo = $SBO::Lib::tmpd; if ($env_tmp && !$interactive) { diff --git a/t/15-usage.t b/t/15-usage.t index c53968f..4a9b61c 100755 --- a/t/15-usage.t +++ b/t/15-usage.t @@ -36,9 +36,9 @@ Options: this screen. -v|--version: version information. - -d|--clean-dist: + -d|--dist: clean distfiles. - -w|--clean-work: + -w|--work: clean working directories. -i|--interactive: be interactive. |