From a392c0e7e7bc0576d18ddfdab189f06fe3f72418 Mon Sep 17 00:00:00 2001 From: Puqns67 Date: Wed, 17 Apr 2024 16:18:21 +0800 Subject: [PATCH] tools: add `sign.fish` --- tools/sign.fish | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100755 tools/sign.fish diff --git a/tools/sign.fish b/tools/sign.fish new file mode 100755 index 0000000..ce9d26b --- /dev/null +++ b/tools/sign.fish @@ -0,0 +1,22 @@ +#!/usr/bin/fish + +function dosign + if test 2 -gt (count {$argv}) + echo "dosign:" + echo "用法: dosign [KEY] [FILES]..." + echo "参数:" + echo " [KEY] 指定用于签名的密钥。" + echo " [FILES]... 要签名的目标文件。" + return 1 + end + + for target in {$argv[2..]} + echo "sign: $target" + gpg --local-user {$argv[1]} --detach-sign {$target} + end +end + +if test 2 -le (count {$argv}) + echo "使用参数 $argv 运行 dosign…" + dosign {$argv} +end