-
Notifications
You must be signed in to change notification settings - Fork 11
/
run_editor.sh
executable file
·49 lines (46 loc) · 1.09 KB
/
run_editor.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
49
#!/bin/bash
STARTDIR=`pwd`
BIN="Editor"
DIR="editor"
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=. ./$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 ..
cd editor
make
cd ..
cd redist
fi
echo "Please try to use $BIN again , and see if the problem is fixed"
fi
fi
cd "$STARTDIR"
exit 0