From abfd2ab1075a0df8f70da92dae77e5d8d4bf699d Mon Sep 17 00:00:00 2001 From: Kevin Day Date: Fri, 16 Dec 2022 18:38:43 -0600 Subject: [PATCH] Feature: Add support for a prepending a prefix to build directory names. This should make it easier to build packages for releases with the packages named for "monolithic-", "level_0-", "stand_alone-", etc... --- build/scripts/package.sh | 34 +++++++++++++++++++++------------- 1 file changed, 21 insertions(+), 13 deletions(-) diff --git a/build/scripts/package.sh b/build/scripts/package.sh index b75a9a7..ea98c9d 100644 --- a/build/scripts/package.sh +++ b/build/scripts/package.sh @@ -50,6 +50,7 @@ package_main() { local path_build=build/ local path_destination=package/ local path_sources=./ + local prepend= local verbosity=normal local verbose= local verbose_common= @@ -108,6 +109,8 @@ package_main() { mode_level="yes" elif [[ $p == "-m" || $p == "--monolithic" ]] ; then mode_monolithic="yes" + elif [[ $p == "-P" || $p == "--prepend" ]] ; then + grab_next=prepend elif [[ $p == "-p" || $p == "--program" ]] ; then mode_program="yes" elif [[ $p == "-s" || $p == "--sources" ]] ; then @@ -129,6 +132,10 @@ package_main() { path_sources=$(echo $p | sed -e 's|^//*|/|' -e 's|/*$|/|') elif [[ $grab_next == "stand_alone" ]] ; then mode_stand_alone="$mode_stand_alone$p " + elif [[ $grab_next == "prepend" ]] ; then + + # Provide a bare minimal sanitizer that probably doesn't catch everything that it ideally should. + prepend=$(echo $p | sed -e 's|[\!~\`@#$%^&*();:>