-
Notifications
You must be signed in to change notification settings - Fork 9
/
cpInstall
57 lines (40 loc) · 1.24 KB
/
cpInstall
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
#!/bin/sh
REMDIR="/segfs/bliss/projects/LIMA/build/depot_win/win_vc9/pco"
REMHOST="blissadm@lid00a"
#LOCDIR="/c/blissadm/git/pco/Lima/install"
LOCDIR="../../install"
LOCDIR_BAT="./bat"
TMPDIR="/t/rhoms1"
DLL="Lima/liblimapco.dll"
LOG="./doc/VERSION.log"
DT=`date +"%Y-%m-%d_%H%M%S"`
INSTALL="install-${DT}"
INSTALLBETA="install-beta"
INSTALLBETA_OLD="install-beta-${DT}"
{
echo ${INSTALL}
echo
./ident.exe ${LOCDIR}/${DLL}
}> ${LOCDIR}/INSTALL_VERSION.txt
mkdir -p ${TMPDIR}/${INSTALL}/bat
cp -r ${LOCDIR}/ ${TMPDIR}/${INSTALL}
cp ${LOCDIR_BAT}/*.bat ${TMPDIR}/${INSTALL}/bat
mv ${TMPDIR}/${INSTALLBETA} ${TMPDIR}/${INSTALLBETA_OLD}
cp -r ${LOCDIR}/ ${TMPDIR}/${INSTALLBETA}
mkdir -p ${TMPDIR}/${INSTALLBETA}/bat
cp ${LOCDIR_BAT}/*.bat ${TMPDIR}/${INSTALLBETA}/bat
scp -r ${TMPDIR}/${INSTALL} ${REMHOST}:${REMDIR}
{
echo
date "+%Y/%m/%d %H:%M:%S =========================================="
echo "scp: copied local directory to segfs and /tmp_14_days:"
echo "from: [${LOCDIR}/] and [${LOCDIR_BAT}/]"
echo " to: [${REMHOST}:${REMDIR}/${INSTALL}]"
echo " to: [${TMPDIR}/${INSTALL}]"
echo " to: [${TMPDIR}/${INSTALLBETA}]"
echo
} > ${LOG}.bck.bck
cat ${LOG}.bck.bck
cat ${LOG} >> ${LOG}.bck.bck
cp -f ${LOG} ${LOG}.bck
mv -f ${LOG}.bck.bck ${LOG}