wok-next annotate linux/stuff/tools/aufs-patches @ rev 19595
Up linux (4.9.4)
author | Aleksej Bobylev <al.bobylev@gmail.com> |
---|---|
date | Sat Jan 21 17:27:31 2017 +0200 (2017-01-21) |
parents | |
children | 99d51a8e04a8 |
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@19595 | 23 if [ -f done.$patch_file ]; then |
al@19595 | 24 echo "Skipping $patch_file"; continue |
al@19595 | 25 fi |
al@19595 | 26 echo -e "\nApply $patch_file" |
al@19595 | 27 patch -p1 -i "$aufs_dir/$patch_file" || exit 1 |
al@19595 | 28 touch done.$patch_file |
al@19595 | 29 done <<EOT |
al@19595 | 30 aufs4-base.patch |
al@19595 | 31 aufs4-mmap.patch |
al@19595 | 32 aufs4-standalone.patch |
al@19595 | 33 aufs4-loopback.patch |
al@19595 | 34 EOT |