27 lines
551 B
Bash
Executable File
27 lines
551 B
Bash
Executable File
#!/bin/bash
|
|
|
|
set -e
|
|
|
|
tmpdir=$(mktemp --tmpdir -d refresh-obs-keys-XXXXXXX)
|
|
trap 'rm -rf "${tmpdir}"' EXIT
|
|
|
|
self=`readlink -f "$0"`
|
|
basedir=`dirname "${self}"`
|
|
keydir="${basedir}/single-keys"
|
|
|
|
cd "${tmpdir}"
|
|
|
|
obs_get() {
|
|
local proj="$1"
|
|
local target="$2"
|
|
|
|
echo "Fetching key for ${proj}"
|
|
osc signkey --notravers "${proj}" > "public.key"
|
|
|
|
mv "public.key" "${target}"
|
|
}
|
|
|
|
obs_get "home:stbuehler" "${keydir}/obs-home-stbuehler.key"
|
|
# obs_get "server:http" "${keydir}/obs-server-http.key"
|
|
# obs_get "openSUSE:Tools" "${keydir}/obs-openSUSE-Tools.key"
|