aboutsummaryrefslogtreecommitdiff
path: root/pkgundo
blob: 9f3ad25d412ebe0e1376b401f9f764d0f1cb04ca (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