From bf675c18080f4f8fdfa20ab51cf381fb14e9609d Mon Sep 17 00:00:00 2001 From: Matteo Cypriani Date: Fri, 20 Nov 2020 09:01:38 +0100 Subject: [PATCH] mvparent: fix moving several dirs with relative paths Moving several directories with relative paths did not work because the script was not going back to its original working directory. --- file_utils/mvparent.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/file_utils/mvparent.sh b/file_utils/mvparent.sh index 951d9be..9eb448e 100755 --- a/file_utils/mvparent.sh +++ b/file_utils/mvparent.sh @@ -1,6 +1,6 @@ #!/bin/sh # -# mvparent.sh, Copyright © 2007, 2010 Matteo Cypriani +# mvparent.sh, Copyright © 2007, 2010, 2020 Matteo Cypriani # # This program is free software. It comes without any warranty, to # the extent permitted by applicable law. You can redistribute it @@ -49,6 +49,7 @@ while [ -n "$1" ] ; do fi rmdir "$target" + cd "$OLDPWD" done # vim: tabstop=8 expandtab shiftwidth=4 softtabstop=4