wok-next annotate linux/stuff/tools/aufs-patches @ rev 20892

linux: up (4.17.7)
author Aleksej Bobylev <al.bobylev@gmail.com>
date Fri Jul 20 01:20:51 2018 +0300 (2018-07-20)
parents 960a052d15d3
children
rev   line source
al@19595 1 #!/bin/sh
al@19595 2 # aufs-patches: source this file in the receipt to get and apply aufs patches
al@19595 3
al@19595 4 # Check for aufs and get source / patches if needed
al@19595 5 echo "Checking for aufs patches..."
al@19595 6 aufs_ver=$(. $WOK/aufs/receipt; echo $VERSION)
al@19595 7 aufs_dir="$WOK/aufs/source/aufs-$aufs_ver"
al@19595 8 if [ ! -d "$aufs_dir" ]; then
al@19595 9 aufs_tarball=$(. $WOK/aufs/receipt; echo $TARBALL)
al@19595 10 [ ! -f "$SRC/$aufs_tarball" ] && cook aufs --getsrc
al@19595 11 mkdir -p $WOK/aufs/source
al@19595 12 _ 'Extracting: %s' $aufs_tarball
al@19595 13 tar -xf $SRC/$aufs_tarball -C $WOK/aufs/source/
al@19595 14 fi
al@19595 15
al@19595 16
al@19595 17 echo "Copying aufs files and patches..."
al@19595 18 cp -a $aufs_dir/Documentation $aufs_dir/fs $aufs_dir/include $src
al@19595 19
al@19595 20 # Apply patches
al@19595 21 echo "Applying aufs patches..."
al@19595 22 while read patch_file; do
al@20892 23 [ ${patch_file:0:1} == '#' ] && continue
al@19595 24 if [ -f done.$patch_file ]; then
al@19595 25 echo "Skipping $patch_file"; continue
al@19595 26 fi
al@19595 27 echo -e "\nApply $patch_file"
al@19595 28 patch -p1 -i "$aufs_dir/$patch_file" || exit 1
al@19595 29 touch done.$patch_file
al@19595 30 done <<EOT
al@19595 31 aufs4-base.patch
al@19595 32 aufs4-mmap.patch
al@19595 33 aufs4-standalone.patch
al@20892 34 # aufs4-loopback.patch
al@19595 35 EOT