<commit_before><commit_msg>aufs.yama<commit_after>#!/bin/bash

rm -Rf aufs4-standalone
# clone the aufs repository to the local disk
git clone git://github.com/sfjro/aufs4-standalone.git aufs4-standalone
cd aufs4-standalone
git branch -r
git checkout origin/aufs4.4

# modify what you want

# and after
# create the patch with the directories: fs, include and Documentation

rm -v $(find . -type f -name '*.orig')
#grep -qse 'EXPORT_SYMBOL(' aufs4-standalone.patch && \
#sed -i-old -e 's|EXPORT_SYMBOL(|EXPORT_SYMBOL_GPL(|' aufs4-standalone.patch
rm -rf ../tmp/linux-4.4
mkdir -p ../tmp/linux-4.4
cp -a fs ../tmp/linux-4.4
cp -a include ../tmp/linux-4.4
cp -a Documentation ../tmp/linux-4.4
rm ../tmp/linux-4.4/include/uapi/linux/Kbuild
cd ../tmp
diff -Naur null linux-4.4  | filterdiff | \
sed -e 's|null\(/include/uapi/linux/Kbuild\)|linux-4.4-old\1|;s|^--- null.*|--- /dev/null|;\|linux-4.4/include/uapi/linux/Kbuild|,${\|@@ -0,0 +1 @@|,$d}' | \
bzip2 > aufs$(sed -ne 's|#define.*AUFS_VERSION.*"\(.*\)"|\1|p'  linux-4.4/include/uapi/linux/aufs_type.h).patch.bz2
mv *.bz2 $OLDPWD
cd $OLDPWD
mv *patch* ..
cd ..
rm -rf tmp aufs4-standalone


# the patch is created in ../tmp
# the other patches needed to compile are in the base directory
{'fraction_non_alphanumeric': 0.1864406779661017, 'fraction_numerical': 0.02986279257465698, 'mean_word_length': 3.290657439446367, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 4, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '478272', 'n_tokens_mistral': 516, 'n_tokens_neox': 493, 'n_words': 125}