blob: 171261f8c340c4ed2043d585d49af5696c9400da (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
|
#!/bin/sh
# pkgundo -- restore original files
[ $# -eq 0 ] && { echo "usage: ${0##*/} file ..." 2>&1; exit 1; }
n=0
for orig in "$@"; do
orig=${orig%.orig}.orig
mv "$orig" "${orig%.orig}" && : $((n++))
done
echo "${0##*/}: moved $n files" 2>&1
|