Browse Source

mnemosyne.pl: Changed to source FEATURE.conf independent of the value of FEATURE, -no.conf deprecated

legacy/next/gcc
Alejandro Mery 16 years ago
parent
commit
ba72a368ec
1 changed files with 7 additions and 15 deletions
  1. +7
    -15
      mnemosyne.pl

+ 7
- 15
mnemosyne.pl

@ -1,12 +1,13 @@
#!/usr/bin/perl
# --- SDE-COPYRIGHT-NOTE-BEGIN ---
# This copyright note is auto-generated by ./scripts/Create-CopyPatch.
#
#
# Filename: target/mnemosyne/mnemosyne.pl
# Copyright (C) 2008 The OpenSDE Project
# Copyright (C) 2002 - 2006 Alejandro Mery
#
#
# More information can be found in the files COPYING and README.
#
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; version 2 of the License. A copy of the
@ -307,8 +308,6 @@ sub render_widgets_folder {
my $var=$module->{var};
my $conffile="$module->{location}/$module->{key}.conf"
if -f "$module->{location}/$module->{key}.conf";
my $noconffile="$module->{location}/$module->{key}-no.conf"
if -f "$module->{location}/$module->{key}-no.conf";
print "${offset}# $var\n";
@ -320,9 +319,7 @@ sub render_widgets_folder {
print "${offset}if \[ -n \"\$$var\" \]; then\n";
print "${offset}\tchoice $var \$$defaultvar \$$listvar\n";
print "${offset}\t. $conffile\n" if $conffile;
print "${offset}\telse\n" if $noconffile;
print "${offset}\t. $noconffile\n" if $noconffile;
print "${offset}\t. $conffile \"$var\" \"\$$var\" \n" if $conffile;
print "${offset}fi\n";
} elsif ($module->{kind} == ASK) {
@ -332,16 +329,11 @@ sub render_widgets_folder {
print "${offset}if \[ -n \"\$$var\" \]; then\n";
print "${offset}\tbool '$module->{desc}' $module->{var} $default\n";
print "${offset}\t\[ \"\$$var\" == 1 \] && . $conffile\n" if $conffile;
print "${offset}\t\[ \"\$$var\" != 1 \] && . $noconffile\n" if $noconffile;
print "${offset}\t. $conffile \"$var\" \"\$$var\" \n" if $conffile;
print "${offset}fi\n";
} elsif ($conffile) {
# ALL, only if $conffile
print "${offset}if \[ -n \"\$$var\" \]; then\n";
print "${offset}\t. $conffile\n" if $conffile;
print "${offset}\telse\n" if $noconffile;
print "${offset}\t. $noconffile\n" if $noconffile;
print "${offset}fi\n";
print "${offset}. $conffile \"$var\" \"\$$var\" \n";
}
}
}

Loading…
Cancel
Save