Commit d870bc1c authored by Aral Balkan's avatar Aral Balkan

better/edit command now correctly checking for targetFile existence not...

better/edit command now correctly checking for targetFile existence not targetDirectory to decide whether to copy draft or not.
parent 7ccd1a77
Pipeline #498 skipped
......@@ -262,9 +262,9 @@ createBranch(){
#
# Check if the directory already exists in content and, if it doesn’t, copy the draft.
#
local targetDirectory=~/better.fyi/content/$category
if [ -d $targetDirectory ]; then
echo " · Content already exists at ${targetDirectory}, not copying."
local targetFile=~/better.fyi/content/$category/$domain
if [ -d $targetFile ]; then
echo " · Content already exists at ${targetFile}, not copying."
else
#
# Copy, add, commit, and push the newly-added draft and the branch itself to the live repository.
......
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