From 7d15fbb3d3cbb8beb6e5f484015ecb8428975308 Mon Sep 17 00:00:00 2001 From: Luka Vandervelden Date: Thu, 24 Oct 2019 00:45:47 +0200 Subject: [PATCH] chmod[$target], version bump Allows setting the permissions of installed files. Defaults to 755 if unset. --- build.zsh.in | 1 + build/binary.zsh | 2 +- project.zsh | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/build.zsh.in b/build.zsh.in index 6d144d0..124419f 100644 --- a/build.zsh.in +++ b/build.zsh.in @@ -205,6 +205,7 @@ done function main { typeset -a prefixes directories typeset -A ldflags cflags sources type depends install auto filename nodist + typeset -A chmod typeset -a tests prefixes=( diff --git a/build/binary.zsh b/build/binary.zsh index 0fccf4c..ac70975 100644 --- a/build/binary.zsh +++ b/build/binary.zsh @@ -29,7 +29,7 @@ function binary.install { write "${target}.install: ${target}" write "\t@echo '$(IN "${install}/${basename}")'" write "\t${Q}mkdir -p '\$(DESTDIR)${install}'" - write "\t${Q}install -m0755 ${target} \$(DESTDIR)${install}/${basename}" + write "\t${Q}install -m${chmod[$target]:-0755} ${target} \$(DESTDIR)${install}/${basename}" write } diff --git a/project.zsh b/project.zsh index c528b4a..4a2acc2 100644 --- a/project.zsh +++ b/project.zsh @@ -1,6 +1,6 @@ package=build_zsh -version=0.3.1 +version=0.4.0 targets=(build.zsh) type[build.zsh]=script