Commit 2e987d14 authored by Silvio Rhatto's avatar Silvio Rhatto
Browse files

Ensure destination folder exists at 'cp' action

parent be12c6d6
2014-09-02 - Silvio Rhatto <rhatto@riseup.net>
Ensure destination folder exists at 'cp' action
2014-08-21 - 0.3.7 - Silvio Rhatto <rhatto@riseup.net>
Init: just set git user/mail if needed
......
......@@ -27,7 +27,10 @@ if ! echo "$ORIG" | grep -q '*' && [ ! -e "$KEYDIR/$RELATIVE_PATH/$ORIG" ]; then
exit 1
fi
# Run move command
# Ensure destination folder exists
mkdir -p `dirname "$KEYDIR/$FILE"`
# Run copy command
cd "$KEYDIR" && cp -a "./$RELATIVE_PATH/$ORIG" "./$FILE"
keyringer_exec git "$BASEDIR" add "keys/$FILE"
cd "$CWD"
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment