aboutsummaryrefslogtreecommitdiff
path: root/scripts/auto-build/prep-auto-build-upload
blob: 145a0ffe3d439d2a481dcdbaf85dbb42e23b263b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#!/bin/sh
# prepare a directory per date for the auto-builders to upload to

# the source dir where this script is
SCRIPT_DIR=`echo $0 | sed 's|\(.*\)/.*$|\1|'`
. $SCRIPT_DIR/auto-build-common

# the name of this script
SCRIPT=`echo $0| sed 's|.*/\(.*\)|\1|g'`
LOGFILE=/home/pd/logs/${DATE}_${TIME}_-_${SCRIPT}_-_${SYSTEM}.txt

BUILD_ROOT="/var/www/auto-build"
TODAYS_ROOT="${BUILD_ROOT}/${DATE}"

chown -R root.root "${BUILD_ROOT}"        >> $LOGFILE 2>&1
mkdir "${TODAYS_ROOT}"                    >> $LOGFILE 2>&1
mkdir "${TODAYS_ROOT}/logs"               >> $LOGFILE 2>&1
chown -R nobody.nogroup "${TODAYS_ROOT}"  >> $LOGFILE 2>&1

rm -f -- ${BUILD_ROOT}/latest             >> $LOGFILE 2>&1
ln -s ${TODAYS_ROOT} ${BUILD_ROOT}/latest >> $LOGFILE 2>&1

chown -R pd.pd /home/pd/                  >> $LOGFILE 2>&1
chmod -R u+rw /home/pd/                   >> $LOGFILE 2>&1