diff options
author | John Ankarström <john@ankarstrom.se> | 2021-07-18 12:47:23 +0200 |
---|---|---|
committer | John Ankarström <john@ankarstrom.se> | 2021-07-18 12:47:23 +0200 |
commit | 830afa08f95e2026f97b62d22484c27d42c104b1 (patch) | |
tree | c823736f34f215bbec8e638cb5a8321827c71c87 /pkgundo | |
parent | 2af4ce763faae0c6f68b171b43e93101047d0c02 (diff) | |
download | patches-830afa08f95e2026f97b62d22484c27d42c104b1.tar.gz |
Add pkgundo script
Diffstat (limited to 'pkgundo')
-rwxr-xr-x | pkgundo | 12 |
1 files changed, 12 insertions, 0 deletions
@@ -0,0 +1,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 |