source: main/trunk/gs-release-builder/upload-files-to-www-internal.sh@ 36212

Last change on this file since 36212 was 36212, checked in by kjdon, 2 years ago

a new repository for greenstone release build system files

File size: 1.7 KB
Line 
1#!/bin/bash
2
3echo "This script ($0)"
4echo " needs to be run from outside the lsb environment (but sudo as root)"
5echo "Doing /bin/mount --bind /proc /opt/lsb-buildenv-x86_64/proc is okay"
6echo " but don't do /usr/sbin/chroot /opt/lsb-buildenv-x86_64 in the terminal\
7 this is run from"
8echo " (and don't do the chroot step in the cron file either)."
9
10source ./setup-env.sh
11
12cd snapshots/
13echo "Looking for uploads in snapshots folder/"
14
15# possible values for list of dirs below (edit for your build system):
16# gs2-caveat
17#gs2-caveat-x64
18#gs2-stable
19#gs2-stable-x64
20#gs3-caveat
21#gs3-caveat-x64
22#gs3-stable
23#gs3-stable-x64
24#gs2-src-caveat
25#gs2-src-stable
26#gs3-src-caveat
27#gs3-src-stable
28#gs2-cd-caveat
29#gs2-cd-stable
30#dec-caveat
31#dec-stable
32
33# edit this list to reflect which builds the current system is in charge of
34for RK in gs3-caveat-x64 gs2-caveat-x64 gs2-stable
35do
36 if [ -d $RK ]
37 then
38 # the star does tab-completion
39 for DIR in $RK/from*/uploads
40 do
41 if [ -d $DIR ]
42 then
43 echo "*** Found uploads folder $DIR"
44 pushd $DIR
45 echo "Running: tar -c * | ssh -i ~/.ssh/upload-caveat-ed25519 [email protected]"
46 #tar -c * | ssh -J [email protected] -T -i ~/.ssh/upload-caveat-ed25519 [email protected] # the old way using a jump host
47 tar -c * | ssh -i ~/.ssh/upload-caveat-ed25519 [email protected]
48
49 popd
50 fi
51 done
52 else
53 echo "*** no upload found for $RK"
54
55 fi
56done
57
Note: See TracBrowser for help on using the repository browser.