summaryrefslogtreecommitdiff
path: root/scripts/convert-patch
blob: 724bcf5861aef26787cc6b45b08031a056902f8c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#!/bin/bash
# Script to convert normal patches into ones usable by git-compiz
if [ -z "$1" -o -z "$2" ]; then
	echo "Usage: $0 [file to convert] [git item]"
	exit 1
fi
if [ ! -f $1 ]; then
	echo "Patch doesn't exist, can't convert"
	exit 2
fi
echo " * Generating new patch"
cat <<EOF >`basename $1`.git-compiz
GIT_OBJECT=$2

---
EOF
cat $1 >>`basename $1`.git-compiz
echo " * Generated `basename $1`.git-compiz"
exit