31 lines
563 B
Bash
31 lines
563 B
Bash
#!/bin/sh
|
|
|
|
ARCH="$(uname -m)"
|
|
REPO_HOST=jenkins@files.pyrocufflink.blue
|
|
REPO_PATH=/srv/www/repohost/repos/dch/fedora/$(rpm --eval %fedora)
|
|
|
|
ssh-add -l
|
|
ssh-add -L
|
|
|
|
mkdir -p "${WORKSPACE_TMP}/sync"
|
|
cd "${WORKSPACE_TMP}/sync"
|
|
ln "${WORKSPACE}/f${FEDORA}"/*.rpm .
|
|
ln "${WORKSPACE}/f${FEDORA}/${ARCH}"/*.rpm .
|
|
|
|
case "${ARCH}" in
|
|
x86_64)
|
|
# only include the SRPM once
|
|
include='*.rpm'
|
|
;;
|
|
*)
|
|
include="*.${ARCH}.rpm"
|
|
;;
|
|
esac
|
|
|
|
rsync -rtiO \
|
|
--chmod=ugo=rwX \
|
|
--include "${include}" \
|
|
--exclude '*' \
|
|
./ \
|
|
"${REPO_HOST}:${REPO_PATH}/"
|