forked from e2tools/e2tools
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathbuild_all.sh
executable file
·57 lines (48 loc) · 1.18 KB
/
build_all.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
50
51
52
53
54
55
56
57
#!/bin/sh
# Simple shell script to build
# * e2fsprogs libs and install the package to custom path
# * make_fs_config
# Dir structure
# e2tools
# BUILD
# e2fsprogs
# BUILD
# INSTALL/lib/pkgconfig
ROOT_DIR="$(pwd)"
cd "$ROOT_DIR"
if [ ! -d e2fsprogs ] && [ ! -d e2fsprogs/lib ]; then
echo "e2fsprogs seems missing!"
exit 1
fi
case "$(uname -s)" in
CYGWIN*)
EXE=".exe";;
esac
cd "$ROOT_DIR/e2fsprogs"
autoreconf -fsi
rm -rf BUILD
mkdir BUILD
cd BUILD
../configure -prefix="$ROOT_DIR/e2fsprogs/BUILD/INSTALL"
if [ $? != 0 ]; then echo "e2fsprogs: configure failed!"; exit 2; fi
make libs
if [ $? != 0 ]; then echo "e2fsprogs: make libs failed!"; exit 2; fi
make install-libs
if [ $? != 0 ]; then echo "e2fsprogs: make install-libs failed!"; exit 2; fi
cd "$ROOT_DIR"
autoreconf -fsi
rm -rf BUILD
mkdir BUILD
cd BUILD
PKG_CONFIG_PATH="$ROOT_DIR/e2fsprogs/BUILD/INSTALL/lib/pkgconfig" ../configure
if [ $? != 0 ]; then echo "e2tools: configure failed!"; exit 2; fi
make
if [ $? != 0 ]; then echo "make failed!"; exit 2; fi
echo "\n\n---------- OUTPUT FILES ----------"
file e2tools$EXE
echo ""
file make_fs_config$EXE
echo ""
file sysXtract$EXE
echo ""
echo ""