aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAngelo Naselli <anaselli@linux.it>2015-05-03 23:20:16 +0200
committerAngelo Naselli <anaselli@linux.it>2015-05-03 23:20:16 +0200
commite9509621999064c403911257daf2d72cb9d6772e (patch)
treeeb76bb84a27080a784bfcabe1b48319f81fc86be
parentf6235f3365decadd339ad654fc000ed5852c7b3b (diff)
downloadcolin-keep-e9509621999064c403911257daf2d72cb9d6772e.tar
colin-keep-e9509621999064c403911257daf2d72cb9d6772e.tar.gz
colin-keep-e9509621999064c403911257daf2d72cb9d6772e.tar.bz2
colin-keep-e9509621999064c403911257daf2d72cb9d6772e.tar.xz
colin-keep-e9509621999064c403911257daf2d72cb9d6772e.zip
Added Shared functions to manage common command line options
-rwxr-xr-xscripts/mana14
1 files changed, 4 insertions, 10 deletions
diff --git a/scripts/mana b/scripts/mana
index 37c6db9..76f903f 100755
--- a/scripts/mana
+++ b/scripts/mana
@@ -23,18 +23,12 @@
#*****************************************************************************
use ManaTools::Privileges;
+use ManaTools::Shared;
use ManaTools::Shared::Locales;
-use yui;
-my $cmdline = new yui::YCommandLine;
-my $locale_dir = undef;
-my $pos = $cmdline->find("--locales-dir");
-if ($pos > 0)
-{
- $locale_dir = $cmdline->arg($pos+1);
-}
-my $loc = ManaTools::Shared::Locales->new(
+my $locale_dir = ManaTools::Shared::custom_locale_dir();
+my $loc = ManaTools::Shared::Locales->new(
domain_name => 'manatools',
dir_name => $locale_dir,
);
@@ -87,7 +81,7 @@ my %modules = (
},
);
-usage() if($cmdline->find("--help") > 0 || $cmdline->find("-h") > 0);
+usage() if ManaTools::Shared::help_requested() ;
usage() if scalar(@ARGV) < 1;
my $cmd = $ARGV[0];