summaryrefslogtreecommitdiffstats
path: root/pull.sh
blob: 8865ddfd0cd27ce8b616be836e2e0e70a91fb0d3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!/bin/bash

set -e

remote=ceph.newdream.net
vers=$1
[ -z "$vers" ] && [ -e .last_release ] && vers=`cat .last_release`
[ -z "$vers" ] && echo specify version && exit 1
echo version $vers

test -d release/$vers || mkdir -p release/$vers

shift

if [ -z "$*" ]; then
    echo fetching $vers
    rsync -auv sage@$remote:release/$vers/ release/$vers
else
    for e in $*; do
	echo fetching $vers/*.$e
	rsync -auv sage@$remote:release/$vers/\*.$e release/$vers
    done
fi