This file is indexed.

/usr/bin/gnc-fq-check is in gnucash 1:2.6.12-1.

This file is owned by root:root, with mode 0o755.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
#!/usr/bin/perl -w
######################################################################
### gnc-fq-check - check for the presence of  Finance::Quote
### From gnc-fq-helper.
### Copyright 2001 Rob Browning <rlb@cs.utexas.edu>
### 
### 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; either version 2 of   
### the License, or (at your option) any later version.              
###                                                                  
### This program is distributed in the hope that it will be useful,  
### but WITHOUT ANY WARRANTY; without even the implied warranty of   
### MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the    
### GNU General Public License for more details.                     
###                                                                  
### You should have received a copy of the GNU General Public License
### along with this program# if not, contact:
###
### Free Software Foundation           Voice:  +1-617-542-5942
### 51 Franklin Street, Fifth Floor    Fax:    +1-617-542-2652
### Boston, MA  02110-1301,  USA       gnu@gnu.org
######################################################################

use strict;
use English;
use FileHandle;

=head1 NAME

gnc-fq-check  -  check for the presence of Finance::Quote
                 From gnc-fq-helper

=head1 SYNOPSIS

gnc-fq-check

=head1 DESCRIPTION

Input: <none>

Output (on standard output, one output form per input line):

A list of quote sources supported by Finance::Quote, or the single
term missing-lib if finance quote could not be executed.

Exit status

0 - success
non-zero - failure

=cut

sub check_modules {
  my @modules = qw(Finance::Quote);
  my @missing;

  foreach my $mod (@modules) {
    if (eval "require $mod") {
      $mod->import();
    }
    else {
      push (@missing, $mod);
    }
  }

  return unless @missing;

  print STDERR "\n";
  print STDERR "You need to install the following Perl modules:\n";
  foreach my $mod (@missing) {
    print STDERR "  ".$mod."\n";
  }

  print STDERR "\n";
  print STDERR "Use your system's package manager to install them,\n";
  print STDERR "or run 'gnc-fq-update' as root.\n";

  print "missing-lib\n";

  exit 1;
}

#---------------------------------------------------------------------------
# Runtime.

# Check for and load non-standard modules
check_modules ();

# Create a stockquote object.
my $quoter = Finance::Quote->new();
my $prgnam = "gnc-fq-check";

my @qsources;
my @sources = $quoter->sources();
foreach my $source (@sources) {
  push(@qsources, "\"$source\"");
}
printf "(\"%s\" %s)\n", $Finance::Quote::VERSION, join(" ", sort(@qsources));

## Local Variables:
## mode: perl
## End: