0xV3NOMx
Linux ip-172-26-7-228 5.4.0-1103-aws #111~18.04.1-Ubuntu SMP Tue May 23 20:04:10 UTC 2023 x86_64



Your IP : 3.21.105.222


Current Path : /proc/self/root/usr/share/dh-exec/
Upload File :
Current File : //proc/self/root/usr/share/dh-exec/dh-exec-illiterate-tangle

#! /usr/bin/perl -w
use strict;

# The first line is the she-bang, always ignore it.
<>;

my @files;
my $last_file;

while (<>) {
        next unless /[\`']/;

        # Find `...' constructs. The first is always the source, the
        # second is the destination.
        while (/\`([^']+)'/) {
                if ($last_file) {
                        push (@files, {src => $last_file, dst => $1});
                        $last_file = undef;
                } else {
                        $last_file = $1;
                }
                s/\`([^']+)'//;
        }

        # Once done, find the '...' constructs, which is always a
        # directory, no second stuff.
        while (/'([^' ]+)'/) {
                push (@files, {src => $1, solo => 1});
                s/'([^' ]+)'//;
        }
};

# Great, we got the stuff extracted, now turn it into something
# illiterate.
foreach (@files) {
        if (defined ($_->{solo})) {
                print $_->{src} . "\n";
        } elsif ($_->{dst} =~ /\/$/) {
                print $_->{src} . " " . $_->{dst} . "\n";
        } else {
                print $_->{src} . " => " . $_->{dst} . "\n";
        }
}