-
Notifications
You must be signed in to change notification settings - Fork 11
/
run_viewer.sh
executable file
·48 lines (45 loc) · 1.13 KB
/
run_viewer.sh
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
#!/bin/bash
STARTDIR=`pwd`
BIN="Viewer"
DIR="viewer"
ORIGINALDIRBIN="../$DIR/$BIN"
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
cd "$DIR"
cd redist
if [ -e $BIN ]
then
ldd $BIN | grep not
#LD_LIBRARY_PATH=.:../3dparty/libfreenect/build/lib:$LD_LIBRARY_PATH
LD_LIBRARY_PATH=. ./$BIN $@
else
if [ -e $ORIGINALDIRBIN ]
then
echo "Could not find redist/$BIN , please consider running scripts/createRedist.sh"
echo "Do you want to try that now ? "
echo
echo -n " (Y/N)?"
read answer
if test "$answer" != "N" -a "$answer" != "n";
then
cd ..
scripts/createRedist.sh
cd redist
fi
echo "Please try to use $BIN again , and see if the problem is fixed"
else
echo "Could not find $BIN anywhere , please make sure you have compiled it successfully"
echo "Do you want to try that automatically now ? "
echo
echo -n " (Y/N)?"
read answer
if test "$answer" != "N" -a "$answer" != "n";
then
cd ..
make
cd redist
fi
echo "Please try to use $BIN again , and see if the problem is fixed"
fi
fi
cd "$STARTDIR"
exit 0