Skip to content

Embed URL

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Run opendesktop.org-style *.desktop files (usually located under ~/.local/share/applications) from the command-line. This is only a bare-bones omplementation. Useful on a Mac. See http://standards.freedesktop.org/desktop-entry-spec/desktop-entry-spec-1.0.html .
#!/usr/bin/perl
use strict;
my $cmd;
my $path;
while (<>) {
if (/^Exec=(.*)/) {
$cmd = $1;
$cmd =~ s{\\\\}{\\}g;
$cmd =~ s{\\`}{`}g;
$cmd =~ s{\\\$}{\$}g;
}
if (/^Path=(.*)/) {
$path = $1;
}
}
if ($cmd) {
if ($path) {
chdir($path);
}
system($cmd);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.