0
|
1 #!/bin/bash
|
|
2
|
|
3 QT_DIR=""
|
|
4 INSTALL_DIR=""
|
|
5 #OPT="Linux_x86_64"
|
|
6
|
|
7
|
|
8 checkDir()
|
|
9 {
|
|
10 echo -n "checking for "$1" ... "
|
|
11 if [ -f $QT_DIR/$1 ]; then
|
|
12 echo $QT_DIR/$1
|
|
13 return 1
|
|
14 else
|
|
15 echo "not found!"
|
|
16 return 0
|
|
17 fi
|
|
18 }
|
|
19
|
|
20 echo
|
|
21 cat license.txt
|
|
22 echo
|
|
23 echo -n "Do you agree to this license?! (y/n) "
|
|
24 read license_accepted
|
|
25 echo
|
|
26
|
|
27 if [ "$license_accepted" != "y" ] && [ "$license_accepted" != "yes" ]; then
|
|
28 echo "License was not accepted, aborting."
|
|
29 exit 1
|
|
30 fi
|
|
31
|
|
32 echo -n "Please enter *absolute* path to install target-directory: "
|
|
33
|
|
34 read INSTALL_DIR
|
|
35 if [ ! -d $INSTALL_DIR ]; then
|
|
36 mkdir $INSTALL_DIR
|
|
37 fi
|
|
38
|
|
39 if [ ! -d $INSTALL_DIR ]; then
|
|
40 echo
|
|
41 echo "[Error:] The desired install-directory does not exist and could also not be created!"
|
|
42 echo "Perhaps there was a typo or you do not have permission to create this folder."
|
|
43 echo "Aborting install."
|
|
44 echo
|
|
45 exit 1
|
|
46 fi
|
|
47
|
|
48 # if [ -f /usr/lib/libQtCore.so.4 ] && [ -f /usr/lib/libQtGui.so.4 ]; then
|
|
49 # QT_DIR=/usr/lib
|
|
50 # else
|
|
51 # echo "Please enter absolute path to the directory containing"
|
|
52 # echo -n "your Qt4 libraries (version>=4.3.5): "
|
|
53 # read QT_DIR
|
|
54 # fi
|
|
55
|
|
56 # checkDir libQtCore.so.4; ok=$?;
|
|
57 # checkDir libQtGui.so.4; if [ $ok = 1 ]; then let ok $?; fi
|
|
58 # #checkDir libQtOpenGL.so; if [ $ok = 1 ]; then ok=$?; fi
|
|
59 #
|
|
60 # if [ $ok != 1 ]; then
|
|
61 # echo "Aborting installation due to missing Qt4!"
|
|
62 # exit 1
|
|
63 # fi
|
|
64
|
|
65 cd bin
|
|
66 programs=`ls *.bin`
|
|
67 cd ..
|
|
68 for i in $programs; do
|
|
69 chmod +x ${i:0:${#i}-4}
|
|
70 done
|
|
71
|
|
72
|
|
73 mv * $INSTALL_DIR/
|
|
74
|
|
75 if [ -f $INSTALL_DIR/CADDSuite-description.txt ]; then
|
|
76 echo
|
|
77 echo
|
|
78 cat $INSTALL_DIR/CADDSuite-description.txt
|
|
79 fi
|
|
80
|
|
81 echo
|
|
82 echo "Installation finished."
|
|
83 echo "You can find all installed programs in $INSTALL_DIR."
|
|
84 echo
|