Last active
May 21, 2021 22:50
-
-
Save BlueSlimee/262287afde01bd787c4b67cbedb2dfdf to your computer and use it in GitHub Desktop.
Download & build xar and lzfse
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
echo "Downloading, patching and building xar" | |
git clone https://github.com/mackyle/xar.git | |
cd xar/xar | |
sed -i 's/OpenSSL_add_all_ciphers/OPENSSL_init_crypto/g' configure.ac | |
wget https://gist.github.com/BlueSlimee/262287afde01bd787c4b67cbedb2dfdf/raw/366811e3abcc929f04621b1f8db76234653cd8e9/ext2.patch | |
git apply --ignore-whitespace ext2.patch | |
bash autogen.sh | |
make | |
cd ../.. | |
XAR=./xar/xar/src/xar | |
echo "Downloading and building LZFSE" | |
git clone https://github.com/lzfse/lzfse.git | |
cd lzfse | |
make | |
cd .. | |
LZFSE=./lzfse/build/bin/lzfse | |
echo "done, bye" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- ./lib/ext2.c | |
+++ ./lib/ext2.c | |
@@ -140,8 +140,10 @@ | |
if(! (flags & ~EXT2_NOCOMPR_FL) ) | |
x_addprop(f, "NoCompBlock"); | |
#endif | |
+#ifdef EXT2_ECOMPR_FL | |
if(! (flags & ~EXT2_ECOMPR_FL) ) | |
x_addprop(f, "CompError"); | |
+#endif | |
if(! (flags & ~EXT2_BTREE_FL) ) | |
x_addprop(f, "BTree"); | |
if(! (flags & ~EXT2_INDEX_FL) ) | |
@@ -229,8 +231,10 @@ | |
if( e2prop_get(f, "NoCompBlock", (char **)&tmp) == 0 ) | |
flags |= EXT2_NOCOMPR_FL ; | |
#endif | |
+#ifdef EXT2_ECOMPR_FL | |
if( e2prop_get(f, "CompError", (char **)&tmp) == 0 ) | |
flags |= EXT2_ECOMPR_FL ; | |
+#endif | |
if( e2prop_get(f, "BTree", (char **)&tmp) == 0 ) | |
flags |= EXT2_BTREE_FL ; | |
if( e2prop_get(f, "HashIndexed", (char **)&tmp) == 0 ) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment