From 364671f032bd748e0a7f8850f9dd91c8c1ca3a8b Mon Sep 17 00:00:00 2001
From: Andreas Romeyke <art1@andreas-romeyke.de>
Date: Mon, 25 Oct 2021 17:16:47 +0200
Subject: [PATCH] - fixed some issues - HINT: because pp seems instable, try
 build_flat_perl_file.sh instead!

---
 build_par_file.sh | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/build_par_file.sh b/build_par_file.sh
index 9ec8bb3..0adb7de 100644
--- a/build_par_file.sh
+++ b/build_par_file.sh
@@ -1,8 +1,10 @@
-#!/bin/sh
+#!/bin/bash
 # Script to bundle Perl-Module with Script
 # by Andreas Romeyke @ SLUB Dresden
+
 REQUIRED_PERL_MODULE=PAR::Packer
 WHAT_TO_BUNDLE=bin/slubsipbuilderbagit.pl
+LIB_TO_BUNDLE="-I lib/ -M SLUB::LZA::SIPBuilderBagIt"
 BUNDLE_NAME=slubsipbuilder_bundled.pl
 BUNDLE_LOG=bundle.log
 echo -n "Checking if required module exists… "
@@ -20,7 +22,9 @@ echo -n "Trying to bundle… "
 # -c .... check dependencies via 'perl -c ...'
 # -P .... build a Perl-script bundle
 # -o .... output as
-pp -c -P -o ${BUNDLE_NAME} ${WHAT_TO_BUNDLE} > ${BUNDLE_LOG} 2>&1
+# -d .... do not include perl interpreter
+#VERBOSE=1 pp ${LIB_TO_BUNDLE} -x -c -d -P -r -z 9 -o ${BUNDLE_NAME} ${WHAT_TO_BUNDLE} > ${BUNDLE_LOG} 2>&1
+pp -o ${BUNDLE_NAME} -P -u -d ${LIB_TO_BUNDLE} ${WHAT_TO_BUNDLE} > ${BUNDLE_LOG} 2>&1
 if [[ $? -eq 0 ]]; then 
   echo "fine :)"
   echo "Successfully build bundles in ${BUNDLE_NAME}"
@@ -30,4 +34,3 @@ else
   echo "Something was wrong in bundling to ${BUNDLE_NAME}"
   echo "Check ${BUNDLE_LOG} for details"
 fi
-
-- 
GitLab