annotate CADDSuite-1.0.1/install.sh @ 28:05d77a8faef7

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