aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/mana
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 /scripts/mana
parentf6235f3365decadd339ad654fc000ed5852c7b3b (diff)
downloadmanatools-e9509621999064c403911257daf2d72cb9d6772e.tar
manatools-e9509621999064c403911257daf2d72cb9d6772e.tar.gz
manatools-e9509621999064c403911257daf2d72cb9d6772e.tar.bz2
manatools-e9509621999064c403911257daf2d72cb9d6772e.tar.xz
manatools-e9509621999064c403911257daf2d72cb9d6772e.zip
Added Shared functions to manage common command line options
Diffstat (limited to 'scripts/mana')
-rwxr-xr-xscripts/mana14
1 files changed, 4 insertions, 10 deletions
diff --git a/scripts/mana b/scripts/mana
index 37c6db95..76f903f1 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];