aboutsummaryrefslogtreecommitdiff
path: root/pkgundo
blob: 2513bf19303117ee57bf19a4dc4848b6a96584a1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
#!/bin/sh

# pkgundo -- restore original files

[ $# -eq 0 ] && { echo "usage: ${0##*/} orig ..." 2>&1; exit 1; }

n=
for orig in "$@"; do
	: $((n++))
	mv "$orig" "${orig%.orig}"
done
echo "${0##*/}: Moved $n files." 2>&1