From: Simon Ruderich Date: Sat, 9 Feb 2013 20:07:34 +0000 (+0100) Subject: bin/mv-p: Rewrap for better readability. X-Git-Url: https://ruderich.org/simon/gitweb/?a=commitdiff_plain;h=92c767c45adb0801913b72675d4afa7bfa0b2e57;p=config%2Fdotfiles.git bin/mv-p: Rewrap for better readability. --- diff --git a/bin/mv-p b/bin/mv-p index 2faade8..f962087 100755 --- a/bin/mv-p +++ b/bin/mv-p @@ -3,7 +3,7 @@ # Wrapper command for `mv` which creates the target directory before moving # the file there. -# Copyright (C) 2011-2012 Simon Ruderich +# Copyright (C) 2011-2013 Simon Ruderich # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -20,7 +20,9 @@ # Get last argument. -for last; do :; done +for last; do + : +done mkdir -p "`dirname "$last"`" \ && mv "$@"