File: genpatch-aufs

package info (click to toggle)
linux 5.10.13-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 1,182,916 kB
  • sloc: ansic: 19,488,074; asm: 263,676; sh: 73,873; makefile: 44,685; perl: 34,640; python: 32,386; cpp: 6,070; yacc: 4,755; lex: 2,742; awk: 1,214; ruby: 25; sed: 5
file content (32 lines) | stat: -rwxr-xr-x 979 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#!/bin/bash -e

aufs_dir="$1"

export GIT_DIR="$aufs_dir/.git"

from_line='From: J. R. Okajima <hooanon05@yahoo.co.jp>'
if [ -d "$GIT_DIR" ]; then
    origin_line="Origin: https://github.com/sfjro/aufs5-standalone/tree/$(git rev-list HEAD -1)"
else
    echo >&2 "W: Cannot include a specific origin URL without an aufs git repo"
    origin_line='Origin: https://github.com/sfjro/aufs5-standalone/branches'
fi
bug_line='Bug-Debian: https://bugs.debian.org/541828'

mkdir -p debian/patches/features/all/aufs5
for patch in aufs5-{base,mmap,standalone}.patch; do
    {
	echo "$from_line"
	if [ -d "$GIT_DIR" ]; then
	    git log --pretty='Date: %ad' HEAD -1 -- "$patch"
	fi
	echo -n 'Subject: '
	grep -v '^SPDX-License-Identifier:' "$aufs_dir/$patch" | head -1
	echo "$origin_line"
	echo "$bug_line"
	echo
	echo 'Patch headers added by debian/bin/genpatch-aufs'
	echo
	sed 's/^+.*EXPORT_SYMBOL\b/&_GPL/' < "$aufs_dir"/"$patch"
    } > debian/patches/features/all/aufs5/"$patch"
done