This file is indexed.

/usr/share/pacpl/bin/PACPL-Convert is in pacpl 5.0.1-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
#!/usr/bin/perl
#
# Copywrite (C) Philip Lyons 2013-2014 (vorzox@gmail.com)
#
#    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 3 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, see <http://www.gnu.org/licenses/>.

use strict;
use warnings;
use File::Spec::Functions qw(rel2abs);

my $debug = 0;
my $input = '';

my $name = "Perl Audio Converter";

my $formats = "FALSE 3G2 FALSE 3GP FALSE 8SVX FALSE AAC FALSE AC3 FALSE ADTS FALSE AIF FALSE AIFF FALSE AL FALSE AMB FALSE AMR FALSE APE FALSE AU FALSE AVR FALSE BONK FALSE CAF FALSE CDR FALSE CVU FALSE DAT FALSE DTS FALSE DVMS FALSE F32 FALSE F64 FALSE FAP FALSE FLA FALSE FLAC FALSE FSSD FALSE GSRT FALSE HCOM FALSE IMA FALSE IRCAM FALSE LA FALSE M4A FALSE MAT FALSE MAT4 FALSE MAT5 FALSE MAUD FALSE MMF FALSE MP2 FALSE MP3 FALSE MP3HD FALSE MP4 FALSE MPC FALSE MPP FALSE NIST FALSE OFF FALSE OFR FALSE OFS FALSE OGA FALSE OGG FALSE OPUS FALSE PAF FALSE PRC FALSE PVF FALSE RA FALSE RAW FALSE RF64 FALSE RM FALSE SD2 FALSE SF FALSE SHN FALSE SMP FALSE SND FALSE SOU FALSE SPX FALSE TTA FALSE TXW FALSE VMS FALSE VOC FALSE W64 FALSE WAV FALSE WMA FALSE WV";

# main sub
sub process_files {

  # sort through input files and discard those with unsupported formats (excluding directories)
  foreach (@ARGV) {

          chomp($_);

          $_ = rel2abs($_);

          my $input_ext = `echo \"$_\" | awk -F"." '{print \$NF}'`;
          print "\"$_\" has the ext $input_ext\n" if $debug == 1;
          
          if (-f $_ and not `pacpl --formats | grep $input_ext`) 
          {
             print "$_ has unrecognized extension, skipping...\n" if $debug == 1;
            `notify-send \"$name\" \"Unable to convert $_ (unsupported format)\"`;
             next;
          }
          else 
          {             
             $input = "$input \"$_\"";
          }
  }       
  
  # invoke pacpl and start conversion process
  if ($input) {

      my $out_format = `zenity --title \"$name\" --width 250 --height 300 --list --radiolist --column 'Select' --column 'Output Format' $formats`;
    
      chomp($out_format);
      
      print  "pacpl --to $out_format $input --gui --gnome\n" if $debug == 1;
      system("pacpl --to $out_format $input --gui --gnome");
  }
  
}

# start main
process_files();