diff options
author | Silvio Rhatto <rhatto@riseup.net> | 2015-11-29 12:34:06 -0200 |
---|---|---|
committer | Silvio Rhatto <rhatto@riseup.net> | 2015-11-29 12:34:06 -0200 |
commit | cf4c25c4b2ff8d7b4a80197a661aa8f32b7e0eeb (patch) | |
tree | 5db00065104d249b6d04c89953315b040507d4b3 /lib | |
parent | 8c3e30a9666fe60042a90de72c21cb4eff114072 (diff) | |
download | keyringer-cf4c25c4b2ff8d7b4a80197a661aa8f32b7e0eeb.tar.gz keyringer-cf4c25c4b2ff8d7b4a80197a661aa8f32b7e0eeb.tar.bz2 |
Ensure destination path exists at mv action
Diffstat (limited to 'lib')
-rwxr-xr-x | lib/keyringer/actions/mv | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/keyringer/actions/mv b/lib/keyringer/actions/mv index 2324145..e31eb85 100755 --- a/lib/keyringer/actions/mv +++ b/lib/keyringer/actions/mv @@ -24,5 +24,8 @@ if ! echo "$ORIG" | grep -q '*' && [ ! -e "$KEYDIR/$RELATIVE_PATH/$ORIG" ]; then exit 1 fi +# Ensure destination path exists +mkdir -p "`dirname $KEYDIR/$RELATIVE_PATH/$DEST`" + # Run move command keyringer_exec git "$BASEDIR" mv "keys/$RELATIVE_PATH/$ORIG" "keys/$FILE" |