wok-undigest annotate linux/stuff/tools/aufs-patches @ rev 1217

copied linux receipt and stuff from wok-next
author Hans-G?nter Theisgen
date Fri Nov 15 16:49:43 2019 +0100 (2019-11-15)
parents
children
rev   line source
Hans-G?nter@1217 1 #!/bin/sh
Hans-G?nter@1217 2 # aufs-patches: source this file in the receipt to get and apply aufs patches
Hans-G?nter@1217 3
Hans-G?nter@1217 4 # Check for aufs and get source / patches if needed
Hans-G?nter@1217 5 echo "Checking for aufs patches..."
Hans-G?nter@1217 6 aufs_ver=$(. $WOK/aufs/receipt; echo $VERSION)
Hans-G?nter@1217 7 aufs_dir="$WOK/aufs/source/aufs-$aufs_ver"
Hans-G?nter@1217 8 if [ ! -d "$aufs_dir" ]; then
Hans-G?nter@1217 9 aufs_tarball=$(. $WOK/aufs/receipt; echo $TARBALL)
Hans-G?nter@1217 10 [ ! -f "$SRC/$aufs_tarball" ] && cook aufs --getsrc
Hans-G?nter@1217 11 mkdir -p $WOK/aufs/source
Hans-G?nter@1217 12 _ 'Extracting: %s' $aufs_tarball
Hans-G?nter@1217 13 tar -xf $SRC/$aufs_tarball -C $WOK/aufs/source/
Hans-G?nter@1217 14 fi
Hans-G?nter@1217 15
Hans-G?nter@1217 16
Hans-G?nter@1217 17 echo "Copying aufs files and patches..."
Hans-G?nter@1217 18 cp -a $aufs_dir/Documentation $aufs_dir/fs $aufs_dir/include $src
Hans-G?nter@1217 19
Hans-G?nter@1217 20 # Apply patches
Hans-G?nter@1217 21 echo "Applying aufs patches..."
Hans-G?nter@1217 22 while read patch_file; do
Hans-G?nter@1217 23 [ ${patch_file:0:1} == '#' ] && continue
Hans-G?nter@1217 24 if [ -f done.$patch_file ]; then
Hans-G?nter@1217 25 echo "Skipping $patch_file"; continue
Hans-G?nter@1217 26 fi
Hans-G?nter@1217 27 echo -e "\nApply $patch_file"
Hans-G?nter@1217 28 patch -p1 -i "$aufs_dir/$patch_file" || exit 1
Hans-G?nter@1217 29 touch done.$patch_file
Hans-G?nter@1217 30 done <<EOT
Hans-G?nter@1217 31 aufs4-base.patch
Hans-G?nter@1217 32 aufs4-mmap.patch
Hans-G?nter@1217 33 aufs4-standalone.patch
Hans-G?nter@1217 34 # aufs4-loopback.patch
Hans-G?nter@1217 35 EOT