2014-12-31 15:08:33 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
set -e
|
|
|
|
|
|
|
|
tmpdir=$(mktemp --tmpdir -d refresh-obs-keys-XXXXXXX)
|
|
|
|
trap 'rm -rf "${tmpdir}"' EXIT
|
|
|
|
|
|
|
|
self=`readlink -f "$0"`
|
|
|
|
basedir=`dirname "${self}"`
|
2018-12-20 15:39:11 +00:00
|
|
|
keydir="${basedir}/single-keys"
|
2014-12-31 15:08:33 +00:00
|
|
|
|
|
|
|
cd "${tmpdir}"
|
|
|
|
|
|
|
|
obs_get() {
|
|
|
|
local proj="$1"
|
|
|
|
local target="$2"
|
|
|
|
|
|
|
|
echo "Fetching key for ${proj}"
|
|
|
|
osc signkey --notravers "${proj}" > "public.key"
|
|
|
|
|
2018-12-20 15:39:11 +00:00
|
|
|
mv "public.key" "${target}"
|
2014-12-31 15:08:33 +00:00
|
|
|
}
|
|
|
|
|
2018-12-20 15:39:11 +00:00
|
|
|
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"
|