UPLOAD_DIR="${BASEDIR}/upload"
UPLOAD_TO="pakfire@fs01.haj.ipfire.org:/pub/nightly"
-RSYNC_ARGS=( "--delay-updates" )
+RSYNC_ARGS=( "-avH" "--progress" "--delay-updates" )
extract_installer_from_iso() {
local dir="${1}"
./make.sh --target="${target}" clean
# Upload the result
- # If that failed, we will keep the result and it will
- # be retried with the next build. If that succeeded, the
- # build will be removed from disk.
- if sync; then
- rm -rf "${UPLOAD_DIR}"
- fi
+ sync
done
popd
# Acquire a Kerberos ticket for authentication
kinit -k -t /etc/krb5.keytab "host/${HOSTNAME}"
- rsync -avH --progress "${RSYNC_ARGS[@]}" \
- "${UPLOAD_DIR}/" "${UPLOAD_TO}"
+ if rsync "${RSYNC_ARGS[@]}" "${UPLOAD_DIR}/" "${UPLOAD_TO}"; then
+ rm -rf "${UPLOAD_DIR}"
+ fi
}
is_locked() {