Permalink
Fetching contributors…
Cannot retrieve contributors at this time
executable file 47 lines (33 sloc) 1019 Bytes
#!/bin/sh
KERNEL_VERSION="$1"
if [ -z "$KERNEL_VERSION" ]; then
echo "Usage: $0 <kernel version>"
echo "Example: $0 3.6"
exit 1
fi
CWD=$(pwd)
dest=$CWD/999_aufs${KERNEL_VERSION}.diff
mkdir /tmp/aufs$$
cd /tmp/aufs$$
# clone aufs git
git clone https://github.com/sfjro/aufs4-standalone.git aufs4-standalone.git
cd aufs4-standalone.git
# uncomment line below to get aufs for stable kernel
git checkout origin/aufs${KERNEL_VERSION}
cd ..
mkdir a b
# create complete AuFS as patch
cp -r aufs4-standalone.git/fs b
cp -r aufs4-standalone.git/Documentation b
cp -r aufs4-standalone.git/include b
rm b/include/uapi/linux/Kbuild
diff -rupN a/ b/ > $dest
# add patches
cat aufs4-standalone.git/aufs4-base.patch >> $dest
cat aufs4-standalone.git/aufs4-standalone.patch >> $dest
cat aufs4-standalone.git/aufs4-kbuild.patch >> $dest
cat aufs4-standalone.git/aufs4-mmap.patch >> $dest
cat aufs4-standalone.git/aufs4-loopback.patch >> $dest
# clean up
rm -rf /tmp/aufs
echo && echo "latest patch created as $dest"