diff options
| author | herkulessi <git@herkulessi.de> | 2026-04-30 15:17:21 +0200 |
|---|---|---|
| committer | herkulessi <git@herkulessi.de> | 2026-04-30 15:17:21 +0200 |
| commit | d0b2b663483870a78f3d9e3b8cda5bf1ea2f6f58 (patch) | |
| tree | 9e6c77a6dbd194d1a4005687cd40686d6fae61cf | |
| parent | 40e84259dd39e34095fae2aa8de74487225daa54 (diff) | |
Make maintainer optional and take package name from environment
| -rwxr-xr-x | pkgsync-ng-nt | 9 |
1 files 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 <debian@herkulessi.de>" +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" |
