403Webshell
Server IP : 3.128.248.115  /  Your IP : 3.136.19.203
Web Server : Apache/2.4.41 (Ubuntu)
System : Linux ip-172-31-33-233 5.15.0-1037-aws #41~20.04.1-Ubuntu SMP Mon May 22 18:18:00 UTC 2023 x86_64
User : www-data ( 33)
PHP Version : 7.4.28
Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : ON
Directory :  /bin/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /bin/dh_bash-completion
#!/usr/bin/perl -w

=head1 NAME

dh_bash-completion - install bash completions for package

=cut

use strict;
use File::Find;
use Debian::Debhelper::Dh_Lib;

=head1 SYNOPSIS

B<dh_bash-completion> [S<I<debhelper options>>]

=head1 DESCRIPTION

dh_bash-completion is a debhelper program that is responsible for installing
completions for bash, usable installing the "bash-completion" package.

If a file named debian/package.bash-completion exists, then different actions
are performed, depending on its format.

It can be a proper completion snippet, and in that case it would be installed
in the completion directory, and no other actions would be performed.

It can also be a list of files, with an optionally specified name to call the
completion snippet after. The file format is as follows:

  my/path/to/foo-completion       # this would be installed as "foo-completion"
  my/path/to/bar-completion  baz  # this would be installed as "baz"

=cut

init();

my $srcdir = '.';
$srcdir = $dh{SOURCEDIR}."/" if defined $dh{SOURCEDIR};

# PROMISE: DH NOOP WITHOUT bash-completion cli-options()

PKG: foreach my $package (@{$dh{DOPACKAGES}}) {
	next if is_udeb($package);

	my $tmp = tmpdir($package);
	my $bc_dir = "$tmp/usr/share/bash-completion/completions";
	my $completions = pkgfile($package,"bash-completion");

	my @install;
	my $name;

	if ($completions) {
		install_dir($bc_dir);

		# try parsing a list of files
		@install = filedoublearray($completions);
		foreach my $set (@install) {
			my @filelist;
			my @tmp = @$set;
			if (@$set > 1) {
				$name = pop @$set;
			}
			else {
				$name = basename($tmp[0]);
			}
			verbose_print "installing $tmp[0] as $name";

			my @found;
			foreach my $glob (@$set) {
				@found = glob "$srcdir/$glob";
				if (!compat(6)) {
					# Fall back to looking into debian/tmp
					if (!@found || !-e $found[0]) {
						@found = glob "debian/tmp/$glob";
					}
				}

				if (!@found || !-e $found[0]) {
					warning "file-list parsing failed, installing as proper snippet";

					install_file($completions, "$bc_dir/$package");
					next PKG
				}
				push @filelist, @found;
			}

			if (!@filelist) {
				error("$package missing files (@$set), aborting");
			}

			foreach my $src (@filelist) {
				install_file($src, "$bc_dir/$name");
			}
		}
	}
}

=head1 SEE ALSO

L<debhelper(1)>

This program is a part of bash-completion.

L<bash(1)>

=head1 AUTHOR

David Paleino <d.paleino@gmail.com>

=cut

Youez - 2016 - github.com/yon3zu
LinuXploit