blob: a0d6915a619b0830d68911e656fef40208b6b358 (
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
25
26
27
28
29
30
31
32
33
34
35
36
37
38
|
#! /bin/bash
RDIR=~/releases
NAME=RusXMMS2
if [ ! -d $RDIR ]; then
if [ -a $RDIR ]; then
echo "Release directory isn't a directory!"
exit
fi
mkdir -p $RDIR
fi
version=$(cat VERSION)
rname="$NAME-$version";
if [ -d $RDIR/$rname ]; then
rm -rf $RDIR/$rname
fi
mkdir -p $RDIR/$rname
if [ ! -d $RDIR/$rname ]; then
echo "Can't create directory!!!"
exit
fi
cp -a * $RDIR/$rname
(
cd $RDIR
if [ -a $rname.tar.bz2 ]; then
rm -f $rname.tar.bz2
fi
tar cjf $rname.tar.bz2 $rname
rm -rf $rname
scp $rname.tar.bz2 csa@darksoft.org:/home/csa/public_html/files/rusxmms/
ssh csa@darksoft.org ln -sf $rname.tar.bz2 /home/csa/public_html/files/rusxmms/$NAME-latest.tar.bz2
)
|