blob: 17af25cdee60fce1948fa93ead12c9b50f0c446c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
#!/bin/sh
# pkgpatch -- patch but don't overwrite original files
move()
{
echo "${0##*/}: Renaming *.$1 to *.$2..." 1>&2
for orig in *.$1; do
mv -i "$orig" "${orig%.$1}".$2
done
}
move orig ~1~
trap 'move ~1~ orig; trap -' INT QUIT TERM EXIT
patch -Vt -F3 "$@"
|