forked from data-accelerator/e2fsprogs
-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.sh
executable file
·32 lines (27 loc) · 833 Bytes
/
build.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
#!/bin/bash
VERSION=${1:-"v1.47.0-opt"}
ARCH=`uname -m`
RELEASE=`date "+%Y%m%d%H%M%S"`
if [[ ! -d build ]];then
echo "create build directory ..."
mkdir build
else
echo "clean bulid directory ..."
rm -rf build/*
fi
echo "build ..."
cd build
../configure --enable-elf-shlibs --disable-debugfs --disable-imager --disable-resizer --disable-defrag \
--disable-uuidd --disable-fuse2fs --disable-fsck --disable-e2initrd-helper \
CFLAGS="-fPIC -O3" CXXFLAGS="-fPIC -O3" --prefix=`pwd`/${VERSION}
make -j8
sudo make install
mkdir libext2fs libext2fs/include libext2fs/lib
cp -r ${VERSION}/include/ext2fs libext2fs/include
cp -P ${VERSION}/lib/libext2fs.so* libext2fs/lib
if [[ ${ARCH} == "aarch64" ]];then
tar -zcf libext2fs.${ARCH}.tar.gz libext2fs
else
tar -zcf libext2fs.tar.gz libext2fs
fi
echo "done"