Skip to content

Commit

Permalink
Allow exclusion of files at module build time
Browse files Browse the repository at this point in the history
  • Loading branch information
jcameron committed Mar 1, 2016
1 parent 51a0631 commit 0291ce2
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 0 deletions.
4 changes: 4 additions & 0 deletions create-module.pl
Expand Up @@ -73,6 +73,10 @@
system("cd /tmp/create-module && find . -name RELEASE -o -name RELEASE.sh | xargs rm -rf");
system("cd /tmp/create-module && find . -name linux.sh -o -name freebsd.sh -o -name LICENCE -o -name README.md -o -name distrib | xargs rm -rf");
system("cd /tmp/create-module && find . -name 'makemodule*.pl' | xargs rm -rf");
if (-r "/tmp/create-module/$subdir/EXCLUDE") {
system("cd /tmp/create-module/$subdir && cat EXCLUDE | xargs rm");
unlink("/tmp/create-module/$subdir/EXCLUDE");
}
unlink("/tmp/create-module/$subdir/IDEAS");
system("cd /tmp/create-module && find . -name \\*.cgi | xargs chmod +x");
system("cd /tmp/create-module && find . -name \\*.pl | xargs chmod +x");
Expand Down
4 changes: 4 additions & 0 deletions makemoduledeb.pl
Expand Up @@ -171,6 +171,10 @@
system("find $usr_dir -name core | xargs rm -rf");
system("find $usr_dir -name RELEASE | xargs rm -rf");
system("find $usr_dir -name RELEASE.sh | xargs rm -rf");
if (-r "$usr_dir/$mod/EXCLUDE") {
system("cd $usr_dir/$mod && cat EXCLUDE | xargs rm -rf");
system("rm -f $usr_dir/$mod/EXCLUDE");
}

# Fix up Perl paths
system("(find $usr_dir -name '*.cgi' ; find $usr_dir -name '*.pl') | perl -ne 'chop; open(F,\$_); \@l=<F>; close(F); \$l[0] = \"#\!/usr/bin/perl\$1\n\" if (\$l[0] =~ /#\!\\S*perl\\S*(.*)/); open(F,\">\$_\"); print F \@l; close(F)'");
Expand Down
4 changes: 4 additions & 0 deletions makemodulerpm.pl
Expand Up @@ -174,6 +174,10 @@
system("/usr/bin/find /tmp/makemodulerpm -name core | xargs rm -rf");
system("/usr/bin/find /tmp/makemodulerpm -name RELEASE | xargs rm -rf");
system("/usr/bin/find /tmp/makemodulerpm -name RELEASE.sh | xargs rm -rf");
if (-r "/tmp/makemodulerpm/$mod/EXCLUDE") {
system("cd /tmp/makemodulerpm/$mod && cat EXCLUDE | xargs rm -rf");
system("rm -f /tmp/makemodulerpm/$mod/EXCLUDE");
}
system("/bin/chown -R root:bin /tmp/makemodulerpm/$mod");

# Tar up the directory
Expand Down

0 comments on commit 0291ce2

Please sign in to comment.