forked from bahamapascal/iccj
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrelease-iccj.bash
More file actions
executable file
·74 lines (55 loc) · 1.2 KB
/
release-iccj.bash
File metadata and controls
executable file
·74 lines (55 loc) · 1.2 KB
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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
#!/bin/bash
if [ -z "${1}" ]; then
echo "Pass version, user, and group on command line"
echo You are:
id
exit
fi
if [ -z "${2}" ]; then
echo "Pass version, user, and group on command line"
echo You are:
id
exit
fi
if [ -z "${3}" ]; then
echo "Pass version, user, and group on command line"
echo You are:
id
exit
fi
version=$1
user=$2
group=$3
dir=/opt
iccdir=$dir/icc
dist=$PWD/dist
if [ -d $dir/icc-pre-${version} ]; then
rm -rf $dir/icc-pre-${version} > /dev/null 2>&1
fi
if [ ! -d $dir ]; then
sudo mkdir $dir
sudo chown $user:$group $dir
fi
if [ -d $iccdir ]; then
mv $iccdir $dir/icc-pre-${version}
fi
if [ ! -d $iccdir ]; then
sudo mkdir $iccdir
sudo chown $user:$group $iccdir
mkdir $iccdir/bin
mkdir $iccdir/repo
mkdir $iccdir/conf
fi
./deploy-iccj.bash $user $group
if [ ! -d $dist ]; then
mkdir $dist
fi
cp changelog.txt $dist/icc-${version}-changelog.txt
cd $dir
rm -f $dist/iccj-${version}.zip > /dev/null 2>&1
zip -r $dist/iccj-${version}.zip icc
# for immediate testing:
rm -rf icc-${version}-dist > /dev/null 2>&1
mv icc icc-${version}-dist
unzip $dist/iccj-${version}.zip
sudo chown -R $user:$group icc