view release on metacpan or search on metacpan
lib/App/Difio/dotCloud.pm view on Meta::CPAN
#!/bin/sh
/home/dotcloud/perl5/lib/perl5/App/Difio/dotCloud.pm
6) Make `postinstall` executable
chmod a+x postinstall
7) Then push your application to dotCloud
dotcloud push <app name>
view all matches for this distribution
view release on metacpan or search on metacpan
t/lib/Test/DocKnot/Spin.pm view on Meta::CPAN
sub fix_pointers {
my ($tree, $base) = @_;
my $rule = Path::Iterator::Rule->new()->name('*.spin')->file();
my $iter = $rule->iter("$tree", { follow_symlinks => 0 });
while (defined(my $file = $iter->())) {
chmod(0644, $file);
my $data_ref = YAML::XS::LoadFile($file);
my $path = path($data_ref->{path});
my $top = path($file)->parent()->relative($tree)->absolute($base);
$data_ref->{path} = $path->absolute($top)->realpath()->stringify();
YAML::XS::DumpFile($file, $data_ref);
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/EPAN.pm view on Meta::CPAN
else
"$MYDIR/cpanm" --mirror "file://$MYDIR" --mirror-only \
$(<"$MYDIR/modlist.txt")
fi
END_OF_INSTALL
chmod 0777 & ~umask(), $file->stringify();
} ## end if (!-e $file)
$file = $target->file('cpanm');
if (!-e $file) {
my $cpanm = which('cpanm');
File::Copy::copy($cpanm, $file->stringify());
chmod 0777 & ~umask(), $file->stringify();
}
} ## end sub action_update
{
no strict 'subs';
view all matches for this distribution
view release on metacpan or search on metacpan
&& mkdir -p /home/linuxbrew/bin \
&& curl -L https://github.com/wang-q/ubuntu/releases/download/20190906/jkbin-egaz-ubuntu-1404-2011.tar.gz | \
tar -xvzf - \
&& mv x86_64/* /home/linuxbrew/bin/ \
&& curl -O http://hgdownload.soe.ucsc.edu/admin/exe/linux.x86_64/faToTwoBit \
&& chmod +x faToTwoBit \
&& mv faToTwoBit /home/linuxbrew/bin/
# RepeatMasker
# https://stackoverflow.com/questions/57629010/linuxbrew-curl-certificate-issue
RUN true \
view all matches for this distribution
view release on metacpan or search on metacpan
CONTRIBUTING.md view on Meta::CPAN
Dependencies for this module are recorded in the `META.json` file.
Installation is most easily done with `cpanminus`[1], which can be
made available locally via:
$ curl -L https://cpanmin.us/ -o cpanm
$ chmod +x cpanm
To install the dependencies into a local directory (to avoid polluting
your Perl distribution),
$ export PERL5LIB=${PERL5LIB}:$PWD/local
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/EvalServerAdvanced/Sandbox.pm view on Meta::CPAN
my $files = shift;
my $work_path = Path::Tiny->tempdir("eval-XXXXXXXX");
$|++;
chmod(0555, $work_path); # have to fix permissions on the new / or nobody can do anything!
unless ($seccomp) {
App::EvalServerAdvanced::Sandbox::Internal->load_plugins();
$seccomp = App::EvalServerAdvanced::Seccomp->new();
$seccomp->load_yaml(config->sandbox->seccomp->yaml); # TODO allow multiple yamls
lib/App/EvalServerAdvanced/Sandbox.pm view on Meta::CPAN
_exit(213) unless $type eq 'c';
mknod("$jail_path/dev/$dev_name", S_IFCHR|0666, makedev($major, $minor));
}
path("$jail_path/tmp")->chmod(0777);
path($jail_home)->chmod(0777);
# Do these before the chroot. Just to avoid weird autoloading issues
set_resource_limits();
chdir($jail_path) or die "Jail was not made"; # ensure it exists before we chroot. unnecessary?
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/FatPacker/Simple.pm view on Meta::CPAN
open my $fh, ">", $output_filename
or die "Cannot open '$output_filename': $!\n";
print {$fh} $fatpacked;
close $fh;
my $mode = (stat $self->{script})[2];
chmod $mode, $output_filename;
$self->debug("Successfully created $output_filename");
}
# In order not to depend on App::FatPacker internals,
# we use only App::FatPacker::fatpack_code method.
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/Fetchware/Util.pm view on Meta::CPAN
# Ensure that $user_temp_dir can be accessed by my drop priv'd child.
# And only try to change perms to 0755 only if perms are not 0755
# already.
my $st = stat(cwd());
unless ((S_IMODE($st->mode) & 0755) >= 0755) {
chmod 0755, cwd() or die <<EOD;
App-Fetchware-Util: Fetchware failed to change the permissions of the current
temporary directory [@{[cwd()]} to 0755. The OS error was [$!].
EOD
}
# Create a new tempdir for the droped prive user to use, and be sure
lib/App/Fetchware/Util.pm view on Meta::CPAN
chown($uid, $gid, $new_temp_dir) or die <<EOD;
App-Fetchware-Util: Fetchware failed to chown [$new_temp_dir] to the user it is
dropping privileges to. This just shouldn't happen, and might be a bug, or
perhaps your system temporary directory is full. The OS error was [$!].
EOD
chmod(0700, $new_temp_dir) or die <<EOD;
App-Fetchware-Util: Fetchware failed to change the permissions of its new
temporary directory [$new_temp_dir] to 0700 that it created, because its
dropping privileges. This just shouldn't happen, and is bug, or perhaps your
system temporary directory is full. The OS error is [$!].
EOD
lib/App/Fetchware/Util.pm view on Meta::CPAN
# Only when we do *not* drop privs...
if (config('stay_root')
or ($< != 0 or $> != 0)
) {
# ...Must chmod 700 so gpg's localized keyfiles are good.
chmod(0700, $temp_dir) or die <<EOD;
App-Fetchware-Util: Fetchware failed to change the permissions of its temporary
directory [$temp_dir] to 0700. This should not happen, and is a bug, or perhaps
your system's temporary directory is full. The OS error was [$!].
EOD
}
lib/App/Fetchware/Util.pm view on Meta::CPAN
=head2 create_tempdir()
my $temp_dir = create_tempdir();
Creates a temporary directory, chmod 700's it, and chdir()'s into it.
Accepts the fake hash argument C<KeepTempDir => 1>, which tells create_tempdir()
to B<not> delete the temporary directory when the program exits.
Also, accepts C<TempDir =E<gt> '/tmp'> to specify what temporary directory to
lib/App/Fetchware/Util.pm view on Meta::CPAN
=over
=item WARNING
According to L<perlport>'s chmod() documentation, on Win32 perl's Unixish file
permissions arn't supported only "owner" is:
"Only good for changing "owner" read-write access, "group", and "other" bits are
meaningless. (Win32)"
I'm not completely sure this means that under Win32 only owner perms mean
something, or if just chmod()ing group or ther bits don't do anything, but
testing if group and other are rwx does work. This needs testing.
And remember this only applies to Win32, and fetchware has not yet been properly
ported or tested under Win32 yet.
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/Followme/UploadLocal.pm view on Meta::CPAN
my $new_dir = catfile($self->{remote_directory}, $dir);
my $status = mkdir($new_dir);
if ($status) {
my $permissions = $self->{permissions} | 0111;
chmod($permissions, $new_dir);
}
return $status;
}
lib/App/Followme/UploadLocal.pm view on Meta::CPAN
my ($self, $local_filename, $remote_filename) = @_;
my $new_file = catfile($self->{remote_directory}, $remote_filename);
my $status = copy($local_filename, $new_file);
chmod($self->{permissions}, $new_file) if $status;
return $status;
}
#----------------------------------------------------------------------
# Close the connection
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/ForExample.pm view on Meta::CPAN
sudo cp my-app.apache2 /etc/apache2/sites-enabled
Enable the fastcgi start-stop script (with execute permissions)
chmod +x my-app.start-stop
Add a C<my-app.localhost> entry to C</etc/hosts>
127.0.0.1 my-app.localhost
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/Framework/Lite.pm view on Meta::CPAN
($exitval, $verbose) = (2, 0) if ($level eq 'opt') ;
($exitval, $verbose) = (1, 0) if ($level eq 'help') ;
($exitval, $verbose) = (0, 2) if ($level =~ /^man/) ;
# make file readable by all - in case we're running as root
chmod 0644, $fname ;
# system("perldoc", $fname) ;
pod2usage(
-verbose => $verbose,
# -exitval => $exitval,
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/Framework.pm view on Meta::CPAN
## Write file
my $blib_pod = "blib/lib/$podfile" ;
if (-f $blib_pod)
{
chmod 0755, $blib_pod ;
}
if (open my $fh, ">$blib_pod")
{
my $list ;
foreach my $href (@list)
view all matches for this distribution
view release on metacpan or search on metacpan
You can also copy the standalone executable to whatever location you'd like.
% cd ~/bin
% curl -LO http://bit.ly/from_unixtime
% chmod +x from_unixtime
NOTE: edit shebang if you don't have /usr/bin/env
=head1 DOCUMENTATION
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/GenPericmdCompleterScript.pm view on Meta::CPAN
print $fh $packed_code;
close $fh
or return [500, "Can't write '$output_file': $!"];
chmod 0755, $output_file or do {
log_warn("Can't 'chmod 0755, $output_file': $!");
};
my $output_name = $output_file;
$output_name =~ s!.+[\\/]!!;
view all matches for this distribution
view release on metacpan or search on metacpan
script/gen-pericmd-script view on Meta::CPAN
Create a Perinci::CmdLine script:
% gen-pericmd-script /App/MyApp/myfunc > mycli
Some more options (turn on debugging, output to file, overwrite existing output,
will automatically chmod +x the file and run L<shcompgen> if it's available on
the system and output dir is in PATH, pick Perinci::CmdLine::Any backend):
% gen-pericmd-script --debug \
-o /path/to/mycli --overwrite \
--cmdline Perinci::CmdLine::Classic \
view all matches for this distribution
view release on metacpan or search on metacpan
script/_genpass-id view on Meta::CPAN
# my $err = $@;
# return [$type, $clsets] unless $err;
# die "Can't check whether $type is a builtin Sah type: $err"
# unless $err =~ /\ACan't locate/;
#
# my $schmod = "Sah::Schema::$type";
# (my $schmod_pm = "$schmod.pm") =~ s!::!/!g;
# eval { require $schmod_pm; 1 };
# die "Not a known built-in Sah type '$type' (can't locate ".
# "Data::Sah::Type::$type) and not a known schema name '$type' ($@)"
# if $@;
# no strict 'refs';
# my $sch2 = ${"$schmod\::schema"};
# die "BUG: Schema module $schmod doesn't contain \$schema" unless $sch2;
# unshift @$clsets, $sch2->[1];
# _resolve($opts, $sch2->[0], $clsets, $seen);
#}
#
#sub resolve_schema {
view all matches for this distribution
view release on metacpan or search on metacpan
script/_genpass-wordlist view on Meta::CPAN
# my $err = $@;
# return [$type, $clsets] unless $err;
# die "Can't check whether $type is a builtin Sah type: $err"
# unless $err =~ /\ACan't locate/;
#
# my $schmod = "Sah::Schema::$type";
# (my $schmod_pm = "$schmod.pm") =~ s!::!/!g;
# eval { require $schmod_pm; 1 };
# die "Not a known built-in Sah type '$type' (can't locate ".
# "Data::Sah::Type::$type) and not a known schema name '$type' ($@)"
# if $@;
# no strict 'refs';
# my $sch2 = ${"$schmod\::schema"};
# die "BUG: Schema module $schmod doesn't contain \$schema" unless $sch2;
# unshift @$clsets, $sch2->[1];
# _resolve($opts, $sch2->[0], $clsets, $seen);
#}
#
#sub resolve_schema {
view all matches for this distribution
view release on metacpan or search on metacpan
if (-e $file) {
mkpath(dirname("$tardir/$file"), 0, 0777);
print STDERR "copy $file $tardir/$file\n";
copy($file, "$tardir/$file");
if ($file =~ m/ (?: Build\.PL | Makefile\.PL ) \z/oxmsi) {
chmod(0664, "$tardir/$file");
}
elsif ($file =~ m/\. (?: pl | bat | exe | com ) \z/oxmsi) {
chmod(0775, "$tardir/$file");
}
elsif ($file =~ m{^bin/}oxmsi) {
chmod(0775, "$tardir/$file");
}
else {
chmod(0664, "$tardir/$file");
}
}
}
system(qq{tar -cvf $tardir.tar $tardir});
system(qq{gzip $tardir.tar});
else {
open(FH_TARBAT, '>ptar') || die "Can't open file: ptar\n";
print FH_TARBAT '#!', &which($^X), "\n";
print FH_TARBAT $ptar;
close FH_TARBAT;
chmod 0755, 'ptar';
}
}
# unzip and untar *.tar.gz
elsif ($target =~ /^xzvf$/) {
else {
open(FH_WGETBAT, '>pwget') || die "Can't open file: pwget\n";
print FH_WGETBAT '#!', &which($^X), "\n";
print FH_WGETBAT $pwget;
close FH_WGETBAT;
chmod 0755, 'pwget';
}
}
else {
warn "unknown target: $target.\n";
}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/Git/IssueManager/AddHook.pm view on Meta::CPAN
open my $hook,">",".git/hooks/post-commit";
print $hook "#!/bin/sh\n";
print $hook "git-issue-commit-hook\n";
close $hook;
system("chmod a+x .git/hooks/post-commit");
}
1;
view all matches for this distribution
view release on metacpan or search on metacpan
for my $file (path('bin')->children) {
next if !-x $file;
my $out = $file;
$out =~ s/bin/out/;
system "fatpack pack $file > $out";
system "chmod +x $out";
}
return;
}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/GitGerrit.pm view on Meta::CPAN
if ($@) {
info "Cannot install $commit_msg hook because you don't have LWP::Simple installed";
} else {
info "Installing $commit_msg hook";
if (LWP::Simple::is_success(LWP::Simple::getstore(config('baseurl') . "/tools/hooks/commit-msg", $commit_msg))) {
chmod 0755, $commit_msg;
}
}
}
# The credential_* routines below use the git-credential command to
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/GitHooks/Plugin/DetectCommitNoVerify.pm view on Meta::CPAN
{
# "git revert" bypasses the pre-commit hook, so we can only use use the
# prepare-commit-msg hook to catch any show-stoppers.
# Since prepare-commit-msg doesn't support --no-verify, we should only
# perform the essential checks when we're analyzing a revert. Note that you
# can still do chmod -x .git/hooks/prepare-commit-msg to force-bypass this
# hook in this case.
my $staged_changes = $app->get_staged_changes();
if ( $staged_changes->is_revert() )
{
chomp( $stdout );
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/GitHooks/Test.pm view on Meta::CPAN
},
'Write the hook.',
);
ok(
chmod( 0755, $hook_path ),
"Make the $hook_name hook executable.",
);
}
);
}
view all matches for this distribution
view release on metacpan or search on metacpan
using the "print-secret" command, but you don't need to.
Then we'll take advantage of the fact that an Ansible Vault password
file can be an executable program that prints the Vault password to
STDOUT. Create a file named vault-password with the following script,
and make it executable (chmod +x vault-password):
#!/bin/sh
# Use groupsecret <https://github.com/chazmcgarvey/groupsecret> to access the Vault password
exec ${GROUPSECRET:-groupsecret} -f vault-password.yml print-secret
view all matches for this distribution
view release on metacpan or search on metacpan
hack.exe.PL view on Meta::CPAN
close $fhi;
open my $fho, '>', $file_out
or croak("Failed to open file `$file_out` for writing: $!");
print $fho $code;
close $fho;
chmod 0755, $file_out;
sub squash_strip {
my $fh = shift;
my $stripped;
my $in_ignore_section = 0;
view all matches for this distribution
view release on metacpan or search on metacpan
You may also choose to download homebank2ledger as a single executable,
like this:
curl -OL https://raw.githubusercontent.com/chazmcgarvey/homebank2ledger/solo/homebank2ledger
chmod +x homebank2ledger
For developers
If you're a developer and want to hack on the source, clone the
repository and pull the dependencies:
view all matches for this distribution
view release on metacpan or search on metacpan
bin/implode view on Meta::CPAN
warn sprintf "Generating $self->{out} with embedded bzip archive...\n" if $self->verbose;
print $OUT $script =~ s/^(#!.+?[\r\n]+)//m ? $1 : "#!/usr/bin/perl\n";
print $OUT $exploder, "\n", $script, "\n__END__\n";
$self->tarball->write(IO::Compress::Bzip2->new($OUT), COMPRESS_GZIP);
close $OUT;
chmod 0755, $self->{out};
warn sprintf "$self->{out} is generated.\n" if $self->verbose;
}
sub chdir {
my $self = shift;
bin/implode view on Meta::CPAN
}
sub tarball {
my $self = shift;
my $chdir = $self->chdir($self->tmpdir);
my $chmod = sub { -f and chmod 0600 | (0777 & (stat _)[2]), $_ };
my $files = sub { @_ > 1 and File::Find::find({no_chdir => 1, wanted => shift}, @_) };
my $tar = Archive::Tar->new;
$files->(
sub {
return unless $chmod->();
warn sprintf "Add @{[catfile $self->{tmpdir}, $_]}\n" if $self->verbose;
$tar->add_files($_);
},
grep {-d} qw( bin lib )
);
undef $chdir;
$files->(
sub {
return unless $chmod->() and s!lib!lib/perl5!;
warn sprintf "Add $_\n" if $self->verbose;
$tar->add_data($_, $self->slurp($File::Find::name));
},
grep {-d} qw( lib )
);
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/Install.pm view on Meta::CPAN
You'll generally do this straight after listing the files to install.
Only non-default permissions need to be specified; the default will be
whatever your system generally creates files as, eg. 0644 for readable
by everyone, writable by owner. See the docs for C<chmod()> for more
information.
=head2 Including variable data in your files
If you wish data to be interpolated into your inline files -- and you
lib/App/Install.pm view on Meta::CPAN
sub _set_permissions {
my ($file) = @_;
return unless $file;
printf " Setting permissions for %s to %lo\n", $file, $App::Install::permissions{$file};
chmod $App::Install::permissions{$file}, $file;
}
=head1 AUTHOR
Kirrily "Skud" Robert, C<< <skud at cpan.org> >>
view all matches for this distribution
view release on metacpan or search on metacpan
t/TestBot.pm view on Meta::CPAN
enabled: 1
allowed_networks:
- $addr
short_url_service: DummyShortener
EOF
chmod 0600, $fh;
close($fh);
my $bot_script =
$ENV{KGB_BOT_SCRIPT} || File::Spec->catfile( 'script', 'kgb-bot' );
view all matches for this distribution
view release on metacpan or search on metacpan
kritika.fatpack view on Meta::CPAN
$fatpacked{"ExtUtils/Helpers.pm"} = '#line '.(1+__LINE__).' "'.__FILE__."\"\n".<<'EXTUTILS_HELPERS';
package ExtUtils::Helpers;$ExtUtils::Helpers::VERSION='0.05';use strict;use warnings FATAL=>'all';use Exporter 5.57 'import';use Config;use File::Basename qw/basename/;use File::Spec::Functions qw/splitpath canonpath abs2rel splitdir/;use Text::Par...
EXTUTILS_HELPERS
$fatpacked{"ExtUtils/Helpers/Unix.pm"} = '#line '.(1+__LINE__).' "'.__FILE__."\"\n".<<'EXTUTILS_HELPERS_UNIX';
package ExtUtils::Helpers::Unix;$ExtUtils::Helpers::Unix::VERSION='0.05';use strict;use warnings FATAL=>'all';use Exporter 5.57 'import';our@EXPORT=qw/make_executable detildefy/;use Carp qw/croak/;use Config;my$layer=$] >= 5.008001 ? ":raw" : "";su...
EXTUTILS_HELPERS_UNIX
$fatpacked{"ExtUtils/Helpers/VMS.pm"} = '#line '.(1+__LINE__).' "'.__FILE__."\"\n".<<'EXTUTILS_HELPERS_VMS';
package ExtUtils::Helpers::VMS;$ExtUtils::Helpers::VMS::VERSION='0.05';use strict;use warnings FATAL=>'all';use Exporter 5.57 'import';our@EXPORT=qw/make_executable detildefy/;use File::Copy qw/copy/;sub make_executable {my$filename=shift;my$batchn...
EXTUTILS_HELPERS_VMS
view all matches for this distribution