From d0b2b663483870a78f3d9e3b8cda5bf1ea2f6f58 Mon Sep 17 00:00:00 2001 From: herkulessi Date: Thu, 30 Apr 2026 15:17:21 +0200 Subject: Make maintainer optional and take package name from environment --- pkgsync-ng-nt | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/pkgsync-ng-nt b/pkgsync-ng-nt index 1eb8567..e7a40a5 100755 --- a/pkgsync-ng-nt +++ b/pkgsync-ng-nt @@ -11,8 +11,9 @@ # AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT # OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -PACKAGE_NAME=herk -PACKAGE_MAINTAINER="herk " +if [ -z "PACKAGE_NAME" ]; then + PACKAGE_NAME="pkgsync-ng-nt" +fi set -eu umask 077 @@ -53,12 +54,14 @@ Standards-Version: 3.9.2 Package: $PACKAGE_NAME Version: $NEW_VERSION -Maintainer: $PACKAGE_MAINTAINER Depends: $(< /etc/packages.yaml yq -r '.install | to_entries | map(.value) | add | map(tostring) | join(", ")'), apt, coreutils, equivs, findutils, yq Conflicts: $(< /etc/packages.yaml yq -r '.remove | to_entries | map(.value) | add | map(tostring) | join(", ")') Description: Metapackage for all needed packages. This is a dummy package, depending on other packages to make Package Management easier. EOF +if ! [ -z ""$PACKAGE_MAINTAINER ]; then + echo "Maintainer: $PACKAGE_MAINTAINER" >> "$PACKAGE_NAME" +fi equivs-build "$PACKAGE_NAME" -- cgit v1.2.3