aboutsummarylogtreecommitdiffstats
path: root/create-patch.sh
blob: 548e20d10c0e2570644537de2390406c2f8f015f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
#!/bin/bash

# This script is used to preview and save patch files.

# Current working directory should contain two subdirectories:
# * "org" — with oryginal GTK3 code,
# * "mod" — with modified GTK3 code.
# Patch file is saved under name specified by first argument.

if [[ -d ./org/gtk ]] && [[ -d ./mod/gtk ]] && [[ $1 ]]; then
	command="diff --color=auto -U 5 -r -Z -B ./org/gtk ./mod/gtk"
	$command > "$1.patch"; reset; $command
fi