From c738ee78e97f3dff6d8b1b4a1cc0f617790563dd Mon Sep 17 00:00:00 2001 From: Matt Madia Date: Fri, 29 Nov 2013 22:18:35 -0500 Subject: [PATCH] Added script for uploading the generated haiku repository. The plan is for Buildbot to utilize this script and upload the packages for each and every successfully built hrev. That portion is still in progress. --- build/scripts/upload_haiku_repository | 30 +++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100755 build/scripts/upload_haiku_repository diff --git a/build/scripts/upload_haiku_repository b/build/scripts/upload_haiku_repository new file mode 100755 index 0000000000..2b464c112d --- /dev/null +++ b/build/scripts/upload_haiku_repository @@ -0,0 +1,30 @@ +#!/bin/sh +# +# Usage: upload_haiku_repository + +set -o errexit + +if [ $# -lt 5 ]; then + echo "$0: Missing parameters!" >&2 + exit 1 +fi + +arch="$1" +generatedDir="$2" +sshUserName="$3" +sshServer="$4" +sshDestPath="$5" +repositoryDir="$generatedDir/objects/haiku/$arch/packaging/repositories/haiku" +packageDir="$repositoryDir/packages" + +# determine the version +fileName=`basename "$packageDir"/haiku-*.hpkg .hpkg` +version=${fileName#*-} +version=${version%%-*} + +# upload the repo +scp -r "$repositoryDir/" "$sshUserName@$sshServer:$sshDestPath/$arch/$version" +ssh "$sshUserName@$sshServer" "chmod -R 755 $sshDestPath/$arch/$version" +sshSymlinkCommand="ln -sfT $version $sshDestPath/$arch/current" +ssh "$sshUserName@$sshServer" "$sshSymlinkCommand" +