]> glassweightruler.freedombox.rocks Git - Ventoy.git/blob - ExFAT/buidexfat.sh
Update README.md
[Ventoy.git] / ExFAT / buidexfat.sh
1 #!/bin/bash
2 #
3 # For 32bit, for example CentOS 6.10 i386
4 # automake 1.11.1 must update to automake 1.11.2
5 # pkg-config must be installed
6 #
7 #
8
9 if uname -a | egrep -q 'x86_64|amd64'; then
10 opt=
11 else
12 opt=-lrt
13 fi
14
15 CUR="$PWD"
16
17 if ! [ -e LIBFUSE ]; then
18 ./buidlibfuse.sh
19 fi
20
21 rm -rf EXFAT
22 mkdir -p EXFAT/shared
23 mkdir -p EXFAT/static
24
25
26 rm -rf exfat-1.3.0
27 unzip exfat-1.3.0.zip
28 sed "/printf.*VERSION/a\ if (access(\"/etc/initrd-release\", F_OK) >= 0) argv[0][0] = '@';" -i exfat-1.3.0/fuse/main.c
29
30 cd exfat-1.3.0
31 autoreconf --install
32 ./configure --prefix="$CUR" CFLAGS='-static -O2 -D_FILE_OFFSET_BITS=64' FUSE_CFLAGS="-I$CUR/LIBFUSE/include/" FUSE_LIBS="$CUR/LIBFUSE/lib/libfuse.a -pthread $opt -ldl"
33 make
34
35 strip --strip-all fuse/mount.exfat-fuse
36 strip --strip-all mkfs/mkexfatfs
37
38 cp fuse/mount.exfat-fuse ../EXFAT/static/mount.exfat-fuse
39 cp mkfs/mkexfatfs ../EXFAT/static/mkexfatfs
40
41 cd ..
42 rm -rf exfat-1.3.0
43
44 unzip exfat-1.3.0.zip
45 sed "/printf.*VERSION/a\ if (access(\"/etc/initrd-release\", F_OK) >= 0) argv[0][0] = '@';" -i exfat-1.3.0/fuse/main.c
46
47
48 cd exfat-1.3.0
49 autoreconf --install
50 ./configure --prefix="$CUR" CFLAGS='-O2 -D_FILE_OFFSET_BITS=64' FUSE_CFLAGS="-I$CUR/LIBFUSE/include/" FUSE_LIBS="$CUR/LIBFUSE/lib/libfuse.a -lpthread -ldl $opt"
51 make
52
53 strip --strip-all fuse/mount.exfat-fuse
54 strip --strip-all mkfs/mkexfatfs
55
56 cp fuse/mount.exfat-fuse ../EXFAT/shared/mount.exfat-fuse
57 cp mkfs/mkexfatfs ../EXFAT/shared/mkexfatfs
58
59 cd ..
60 rm -rf exfat-1.3.0
61
62
63
64