-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmrelease
executable file
·37 lines (27 loc) · 930 Bytes
/
mrelease
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
#! /bin/bash
MT="/tmp"
TD="$MT/AUSTAUSCH"
source /opt/AmutaQ!/etc/AmutaQ!.conf
mkdir $TD
if [ -d $TD ];then
echo "Target available, fine!"
else
echo "Target $TD NOT available, will mount!"
mount $MT
fi
if [ -d $TD ];then
echo "Target available, fine!"
else
echo "Target $TD NOT available, exit!"
exit 1
fi
DT=`date +"%d-%b-%y-%H"`
#FN="/opt/AmutaQ!/release_`hostname`${DT}.tar"
FN="/opt/AmutaQ!/release.tar"
FNT="/opt/AmutaQ!/release.txt"
FNI="/opt/AmutaQ!/release.inf"
echo "$VERSION" > $FNT
echo "`hostname`-${DT}" > $FNI
#rem diverse excludes
# tar --exclude="/opt/AmutaQ!/update" --exclude="*.0" --exclude="*.1" --exclude="*.2" --exclude="*.3" --exclude="/backup" --exclude="2015*" --exclude=*.idx --exclude="temp" --exclude="*.conf" --exclude="*.tmp" --exclude="*.txt" --exclude="*.tar" --exclude="test*" --exclude="bazaarvc*" -cf $FN /opt/AmutaQ!
tar -X ./mrelease.stt -cf $FN /opt/AmutaQ!