-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstall.sh
More file actions
executable file
·42 lines (32 loc) · 774 Bytes
/
install.sh
File metadata and controls
executable file
·42 lines (32 loc) · 774 Bytes
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
#!/bin/bash
#
# main installing script
#
set -x
if [ $# -ne 1 ]
then
echo "usage: $0 <path to version.7z>"
exit 1
fi
if [ ! -f $1 ]
then
echo "the file $1 was not found"
exit 1
fi
export VER_PATH=$1
export VER=$(echo $VER_PATH | awk -F/ '{print $NF}' | sed 's/.7z//g')
export VER_FOLDER=/cygdrive/c/CommuniTake/Versions
export VER_FOLDER_WIN="C:\CommuniTake\Versions"
export UPDATER=/cygdrive/c/CommuniTake/Utils/tomcat.update-ct-build-version.cmd
echo "copying $VER.7z to $VER_FOLDER"
mv $VER_PATH $VER_FOLDER &> /dev/null
cd $VER_FOLDER &> /dev/null
echo "extracting $VER.7z"
7z x $VER.7z < <(yes Y) &> /dev/null
rm -rf $VER.7z
if [ $? -ne 0 ]
then
echo "7z reported an error with $VER.7z. Please verify the file."
exit 1
fi
$UPDATER $VER_FOLDER_WIN/$VER