libroot/posix/stdio: Remove unused portions.
[haiku.git] / build / scripts / upload_haiku_repository
blob727a6a3accca159feae4a83366e67c5a8c2a650e
1 #!/bin/sh
3 # Usage: upload_haiku_repository <arch> <generatedDir> <sshUserName> <sshServer> <sshDestPath>
5 set -o errexit
7 if [ $# -lt 5 ]; then
8 echo "$0: Missing parameters!" >&2
9 exit 1
12 arch="$1"
13 generatedDir="$2"
14 sshUserName="$3"
15 sshServer="$4"
16 sshDestPath="$5"
17 repositoryDir="$generatedDir/objects/haiku/$arch/packaging/repositories/haiku"
18 packageDir="$repositoryDir/packages"
20 # determine the version
21 fileName=`basename "$packageDir"/haiku-*.hpkg .hpkg`
22 version=${fileName#*-}
23 version=${version%%-*}
25 # upload the repo
26 rsync -rutlv -e ssh "$repositoryDir/" "$sshUserName@$sshServer:$sshDestPath/$arch/$version/"
27 ssh "$sshUserName@$sshServer" "chmod -R 755 $sshDestPath/$arch/$version"
28 sshSymlinkCommand="ln -sfT $version $sshDestPath/$arch/current"
29 ssh "$sshUserName@$sshServer" "$sshSymlinkCommand"