• R/O
  • HTTP
  • SSH
  • HTTPS

alterlinux-repository: コミット

GitHubのミラーです
https://github.com/FascodeNet/alterlinux-repository


コミットメタ情報

リビジョンdd48508f60d0470c0aef77e0575db1da3ed69ce1 (tree)
日時2021-04-11 22:41:11
作者hayao <hayao@fasc...>
コミッターhayao

ログメッセージ

[update] : Supported Specifing gpg key

変更サマリ

差分

--- a/scripts/main.sh
+++ b/scripts/main.sh
@@ -27,6 +27,7 @@ nocolor=false
2727 force=false
2828 force_repo=false
2929 command=""
30+gpgkey=""
3031 skip_pkg=()
3132
3233 set -e
@@ -43,6 +44,7 @@ _usage() {
4344 echo " -g | --giturl <url> Specify the URL of the repository where the PKGBUILD list is stored"
4445 echo " -f | --force Force builds of already built packages"
4546 echo " --force-repo Overwrite the existing repository."
47+ echo " -k | --gpgkey Specify the gpg key"
4648 echo " -w | --workdir <dir> Specify the work dir"
4749 echo " -h | --help Show this help message"
4850 echo
@@ -272,7 +274,7 @@ sign_pkg() {
272274 remove "${_pkg_dir}/"*".sig"
273275 for pkg in $(ls "${_pkg_dir}/"*".pkg.tar."* | grep -v ".sig" | grep -v ".sh"); do
274276 _msg_info "Signing ${pkg}..."
275- gpg --detach-sign ${pkg}
277+ gpg -u "${gpgkey}" --detach-sign ${pkg}
276278 done
277279 }
278280
@@ -363,8 +365,8 @@ if [[ -z "${@}" ]]; then
363365 fi
364366
365367 options="${@}"
366-_opt_short="h,a:,g:,r:,w:,f,s:"
367-_opt_long="help,arch:,giturl:,repodir:,workdir:,force,force-repo,nocolor,skip:"
368+_opt_short="h,a:,g:,r:,w:,f,s:k:"
369+_opt_long="help,arch:,giturl:,repodir:,workdir:,force,force-repo,nocolor,skip:,gpgkey:"
368370 OPT=$(getopt -o ${_opt_short} -l ${_opt_long} -- "${@}")
369371 if [[ ${?} != 0 ]]; then
370372 exit 1
@@ -401,6 +403,10 @@ while :; do
401403 force=true
402404 shift 1
403405 ;;
406+ -k | --gpgkey)
407+ gpgkey="${2}"
408+ shift 2
409+ ;;
404410 --force-repo)
405411 force_repo=true
406412 shift 1
旧リポジトリブラウザで表示