From: Kevin Day Date: Sat, 17 Dec 2022 00:38:43 +0000 (-0600) Subject: Feature: Add support for a prepending a prefix to build directory names. X-Git-Tag: 0.6.2~1 X-Git-Url: https://git.kevux.org/?a=commitdiff_plain;h=abfd2ab1075a0df8f70da92dae77e5d8d4bf699d;p=fll 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... --- 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|[\!~\`@#$%^&*();:>