From 830afa08f95e2026f97b62d22484c27d42c104b1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?John=20Ankarstr=C3=B6m?= Date: Sun, 18 Jul 2021 12:47:23 +0200 Subject: Add pkgundo script --- pkgundo | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100755 pkgundo (limited to 'pkgundo') diff --git a/pkgundo b/pkgundo new file mode 100755 index 0000000..2513bf1 --- /dev/null +++ b/pkgundo @@ -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 -- cgit v1.2.3