-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfigure
executable file
·77 lines (53 loc) · 1.59 KB
/
configure
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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
#!/bin/bash
set -e;
SYS=`uname -o`;
if [[ $UID != 0 ]]; then
SUDO="sudo";
fi
MODE=$1;
if [[ $MODE == release || $MODE == ci ]]; then
echo -n 1 >| 0-RELEASE;
fi
INSTALL_ROOT=/usr/local;
if [[ $SYS == Darwin ]]; then
if ! command -v brew > /dev/null; then
echo Installing Homebrew...;
$SUDO /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)";
fi;
if [[ $MODE != ci ]]; then
if [[ ! -f ../JX/Makefile && -z $JX_ROOT ]]; then
brew tap jafl/jx;
brew install jafl/jx/jx-application-framework;
fi
fi
INSTALL_ROOT=`brew --prefix`;
elif command -v apt-get; then
# debian
if [[ -z $SNAPCRAFT_BUILD_ENVIRONMENT ]]; then
$SUDO apt update;
if [[ ! -f ../JX/Makefile && -z $JX_ROOT ]]; then
curl -LO https://libjx.sourceforge.net/ci/re-flex.deb
curl -LO https://libjx.sourceforge.net/ci/jx-application-framework.deb;
$SUDO apt install ./re-flex.deb ./jx-application-framework.deb;
fi
fi
elif command -v dnf; then
# redhat
if [[ -z $SNAPCRAFT_BUILD_ENVIRONMENT ]]; then
if [[ ! -f ../JX/Makefile && -z $JX_ROOT ]]; then
$SUDO dnf install -y \
https://libjx.sourceforge.net/ci/jx-application-framework-fedora.rpm \
https://libjx.sourceforge.net/ci/re-flex-fedora.rpm \
https://libjx.sourceforge.net/ci/ace-fedora.rpm;
fi
fi
fi
if [[ ! -d $INSTALL_ROOT/include/reflex/ && -z $SNAPCRAFT_PART_INSTALL ]]; then
echo "Please install RE/flex library.";
exit 1;
fi
if [[ ! -d $INSTALL_ROOT/include/jx-af/ && ! -f ../JX/Makefile && -z $JX_ROOT ]]; then
echo "Please install jx-application-framework.";
exit 1;
fi
makemake;