]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/blob - debian/scripts/misc/update-aufs.sh
UBUNTU: [debian] Initial debian and ubuntu directories
[mirror_ubuntu-artful-kernel.git] / debian / scripts / misc / update-aufs.sh
1 #!/bin/bash
2
3 AUFS=aufs4-standalone
4
5 #
6 # Before you run this be sure you've removed or reverted the 'UBUNTU: SAUCE: AUFS" patch.
7 #
8 #
9 # Make sure the current working directory is at the top of the
10 # linux tree.
11 #
12 if ! grep PATCHLEVEL Makefile
13 then
14 echo "You must run this script from the top of the linux tree"
15 exit 1
16 fi
17
18 clean=0
19 if [ "$#" = 1 ]; then
20 AUFS="$1"
21 else
22 clean=1
23 rm -rf ${AUFS}
24 git clone https://github.com/sfjro/aufs4-standalone.git ${AUFS}
25 (cd ${AUFS}; git checkout -b aufs4.x-rcN remotes/origin/aufs4.x-rcN)
26 fi
27
28 cp ${AUFS}/include/uapi/linux/aufs_type.h include/uapi/linux
29 rsync -av ${AUFS}/fs/ fs/
30 rsync -av ${AUFS}/Documentation/ Documentation/
31
32 PATCHES="${PATCHES} aufs4-kbuild.patch"
33 PATCHES="${PATCHES} aufs4-base.patch"
34 PATCHES="${PATCHES} aufs4-mmap.patch"
35 PATCHES="${PATCHES} aufs4-standalone.patch"
36 PATCHES="${PATCHES} aufs4-loopback.patch"
37 #PATCHES="${PATCHES} vfs-ino.patch"
38 PATCHES="${PATCHES} tmpfs-idr.patch"
39
40 for i in ${PATCHES}
41 do
42 patch -p1 < ${AUFS}/$i
43 done
44
45 [ "$clean" = 1 ] && rm -rf ${AUFS}
46 git add mm/prfile.c
47 git add -u
48 find . -name "*.orig" | xargs rm
49 find . |grep aufs | xargs git add
50 git commit -s -m"UBUNTU: SAUCE: AUFS"