This file is indexed.

/usr/bin/perlpanel-applet-install is in perlpanel 1:0.9.1+cvs20051225-2ubuntu1.

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
#!/usr/bin/perl
# This file is part of PerlPanel.
# 
# PerlPanel 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.
# 
# PerlPanel 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 PerlPanel; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
#
# Copyright: (C) 2003-2004 Gavin Brown <gavin.brown@uk.com>
#
# $Id: perlpanel-applet-install,v 1.1 2004/10/19 23:09:51 jodrell Exp $

#
# are we installed or running in a sandbox?
#
use lib (-e '/usr/share/perlpanel/' ? '/usr/share/perlpanel/' : $ENV{PWD}.'/lib/');

use PerlPanel;
use Getopt::Long;
use Data::Dumper;
use strict;

#
# set the values for prefix and libdir:
#
$PerlPanel::PREFIX = (-e '/usr' ? '/usr' : $ENV{PWD});
$PerlPanel::LIBDIR = (-e '/usr/share/perlpanel/' ? '/usr/share/perlpanel/' : $ENV{PWD}.'/lib/');

#
# if we're in a sandbox then it's handy to add ./src to the PATH:
#
$ENV{PATH} = $ENV{PATH}.':'.$ENV{PWD}.'/src' if (!-e '/usr');

my ($user, $site, $file, $help);
GetOptions(
	'user'		=> \$user,
	'site'		=> \$site,
	'file=s'	=> \$file,
	'help'		=> \$help,
);

if ($help > 0) {
	print <<"END";
perlpanel-applet-install - install a PerlPanel applet.
Usage: perlpanel-applet-install [OPTIONS]
Options:
        --user          install applet for a single user
        --site          install applet for all users
        --file          file to extract from
        --help          show this help.
END
	exit 0;

} elsif ($user > 0 && $site > 0) {
	print STDERR _('Error: cannot use --site and --user at the same time!')."\n";
	exit 1;

} elsif ($user < 1 && $site < 1) {
	print STDERR _('Error: must choose either --user or --site!')."\n";
	exit 1;

} elsif (!-r $file) {
	print STDERR _("Error: file '{file}' not found!", file => $file)."\n";
	exit 1;

} else {
	my %args;
	if ($user > 0) {
		%args = (
			datadir	=> sprintf('%s/.local/share', $ENV{HOME}),
			libdir	=> sprintf('%s/.%s/applets', $ENV{HOME}, lc($PerlPanel::NAME)),
			regfile	=> sprintf('%s/.%s/applet.registry', $ENV{HOME}, lc($PerlPanel::NAME)),
		);
	} else {
		%args = (
			datadir	=> sprintf('%s/share', $PerlPanel::PREFIX),
			libdir	=> sprintf('%s/%s/Applet', $PerlPanel::LIBDIR, $PerlPanel::NAME),
			regfile	=> sprintf('%s/share/%s/applet.registry', $PerlPanel::PREFIX, lc($PerlPanel::NAME)),
		);
	}
	print Dumper(\%args);
	my ($code, $error) = PerlPanel::install_applet($file, %args);
	if ($code == 1) {
		print STDERR _("Error: {error}", error => $error)."\n";
		exit 1;

	} else {
		exit 0;

	}
}

exit;