#!/bin/bash # After running of ./upstream-collect.sh, this script will update FTP. set -o errexit OSC_PACKAGE_DIR=/home/sbrabec/OSCI/home:sbrabec:branches:SUSE:SLE-11-SP4:proposed-translation-fixes/translation-update-upstream FTP_MIRROR_DIR=/home/sbrabec/local/ftp.suse.com/pub/people/sbrabec/translation-update-upstream BRANCH=SLE11-SP4 API=https://api.suse.de PROJECT=home:sbrabec:branches:SUSE:SLE-11-SP4:proposed-translation-fixes cd "$OSC_PACKAGE_DIR" RPM_NAME=$(sed -n 's/^Name: *//p' "$FTP_MIRROR_DIR/$BRANCH/proposed-translation-fixes/$PKG.patch" for FILE in $(sed -n "s/^Binary file '\(.*\)' has changed\./\1/p" <"$FTP_MIRROR_DIR/$BRANCH/proposed-translation-fixes/$PKG.patch") ; do mkdir -p "$FTP_MIRROR_DIR/$BRANCH/proposed-translation-fixes/$PKG" osc -A "$API" cat "$PROJECT" "$PKG" "$FILE" >"$FTP_MIRROR_DIR/$BRANCH/proposed-translation-fixes/$PKG/$FILE" done done rm -f "$FTP_MIRROR_DIR/$BRANCH/proposed-translation-fixes/translation-update-upstream.patch" "$FTP_MIRROR_DIR/$BRANCH/proposed-translation-fixes/translation-update.patch" # These packages are links: rm -f "$FTP_MIRROR_DIR/$BRANCH/proposed-translation-fixes/ConsoleKit-doc.patch" "$FTP_MIRROR_DIR/$BRANCH/proposed-translation-fixes/apparmor-docs.patch" touch -r . "$FTP_MIRROR_DIR/$BRANCH" "$FTP_MIRROR_DIR/$BRANCH/generated-outputs" echo "Done!"