tool/depot/publish: prevent empty .sig files

If GPG signing is aborted, e.g., by pressing CTRL-C, an empty .sig file
remained in PUBLIC_DIR because the file was created by the Bash
redirection. By using '--output $@', gpg maintains the .sig file.
This commit is contained in:
Christian Helmuth 2023-05-03 10:59:54 +02:00
parent b96004fd71
commit 5c501997ca

View File

@ -126,8 +126,8 @@ MISSING_PUBKEY_FILES := $(sort \
$(if $(call pubkey_path,$A),,\ $(if $(call pubkey_path,$A),,\
$(call pubkey_filename,$A)))) $(call pubkey_filename,$A))))
_gpg_sign_target = gpg --detach-sign --digest-algo SHA256 --no-tty --use-agent \ _gpg_sign_target = $(GPG) --detach-sign --digest-algo SHA256 --no-tty --use-agent \
--local-user $(call pubkey_id,$*) - < $< > $@ || \ --local-user $(call pubkey_id,$*) --output $@ < $< || \
( rm -f $@; false ) ( rm -f $@; false )
$(PUBLIC_DIR)/%.xz.sig : $(PUBLIC_DIR)/%.xz $(PUBLIC_DIR)/%.xz.sig : $(PUBLIC_DIR)/%.xz