GitHubのミラーです
https://github.com/FascodeNet/alterlinux-repository
リビジョン | dd48508f60d0470c0aef77e0575db1da3ed69ce1 (tree) |
---|---|
日時 | 2021-04-11 22:41:11 |
作者 | hayao <hayao@fasc...> |
コミッター | hayao |
[update] : Supported Specifing gpg key
@@ -27,6 +27,7 @@ nocolor=false | ||
27 | 27 | force=false |
28 | 28 | force_repo=false |
29 | 29 | command="" |
30 | +gpgkey="" | |
30 | 31 | skip_pkg=() |
31 | 32 | |
32 | 33 | set -e |
@@ -43,6 +44,7 @@ _usage() { | ||
43 | 44 | echo " -g | --giturl <url> Specify the URL of the repository where the PKGBUILD list is stored" |
44 | 45 | echo " -f | --force Force builds of already built packages" |
45 | 46 | echo " --force-repo Overwrite the existing repository." |
47 | + echo " -k | --gpgkey Specify the gpg key" | |
46 | 48 | echo " -w | --workdir <dir> Specify the work dir" |
47 | 49 | echo " -h | --help Show this help message" |
48 | 50 | echo |
@@ -272,7 +274,7 @@ sign_pkg() { | ||
272 | 274 | remove "${_pkg_dir}/"*".sig" |
273 | 275 | for pkg in $(ls "${_pkg_dir}/"*".pkg.tar."* | grep -v ".sig" | grep -v ".sh"); do |
274 | 276 | _msg_info "Signing ${pkg}..." |
275 | - gpg --detach-sign ${pkg} | |
277 | + gpg -u "${gpgkey}" --detach-sign ${pkg} | |
276 | 278 | done |
277 | 279 | } |
278 | 280 |
@@ -363,8 +365,8 @@ if [[ -z "${@}" ]]; then | ||
363 | 365 | fi |
364 | 366 | |
365 | 367 | 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:" | |
368 | 370 | OPT=$(getopt -o ${_opt_short} -l ${_opt_long} -- "${@}") |
369 | 371 | if [[ ${?} != 0 ]]; then |
370 | 372 | exit 1 |
@@ -401,6 +403,10 @@ while :; do | ||
401 | 403 | force=true |
402 | 404 | shift 1 |
403 | 405 | ;; |
406 | + -k | --gpgkey) | |
407 | + gpgkey="${2}" | |
408 | + shift 2 | |
409 | + ;; | |
404 | 410 | --force-repo) |
405 | 411 | force_repo=true |
406 | 412 | shift 1 |