Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/sh
- export PERL_USE_UNSAFE_INC=1
- # Pull cpm from github. There will now be a fatpacked binary in cpm/cpm.
- git submodule update --init
- perl cpm/cpm install -L local --target-perl 5.14.0 --with-develop --without-test || exit 1
- export PERL5LIB=$PWD/lib:$PWD/local/lib/perl5
- export PATH=$PWD/local/bin:$PATH
- export PERL_JSON_BACKEND=JSON::PP
- export B_HOOKS_ENDOFSCOPE_IMPLEMENTATION=PP
- export PACKAGE_STASH_IMPLEMENTATION=PP
- export PARAMS_VALIDATE_IMPLEMENTATION=PP
- export LIST_MOREUTILS_PP=1
- export MOO_XS_DISABLE=1
- perl -c trailbreaker.pl || exit 1
- trap 'rm -rf .build fatlib fatpacker.trace fatpacker.trace.bak packlists' EXIT
- fatpack trace trailbreaker.pl || exit 1
- fatpack packlists-for $(cat fatpacker.trace) > packlists || exit 1
- fatpack tree $(cat packlists) || exit 1
- # Copy in the app libs
- cp -r lib/* fatlib
- # Sometimes arch stuff ends up in the trace despite our best efforts, but if we
- # did our job right then the modules will work even without it (and might break
- # on a different arch with it). So nuke it all.
- rm -rf fatlib/$(perl -MConfig -e 'print $Config{archname}')
- # Delete stuff that takes up space and makes perlstrip whine
- find fatlib -name \*.pod -delete
- find fatlib -name \*.pl -delete
- find fatlib -type f -exec perlstrip {} +
- fatpack file trailbreaker.pl > trailbreaker
- # Add the config file
- echo '__DATA__' >> trailbreaker
- cat default_config.yaml >> trailbreaker
- chmod +x trailbreaker
Add Comment
Please, Sign In to add comment