Fix indent and echo file not found

This commit is contained in:
chonghe
2023-10-03 20:40:13 +08:00
parent 976bcf3f1a
commit 5e64c26d8c

View File

@@ -10,7 +10,7 @@ write_to_file() {
cmd=${cmd#*$'\n'} cmd=${cmd#*$'\n'}
# We need to add the header and the backticks to create the code block. # We need to add the header and the backticks to create the code block.
printf "# %s\n\n\`\`\`\n%s\n\`\`\`" "$program" "$cmd" > "$file" printf "# %s\n\n\`\`\`\n%s\n\`\`\`" "$program" "$cmd" > "$file"
} }
# Check if a lighthouse binary exists in the current branch. # Check if a lighthouse binary exists in the current branch.
@@ -67,6 +67,7 @@ else
cp $2 ./book/src cp $2 ./book/src
changes=true changes=true
exist+=(true) exist+=(true)
echo "$1 is not found, it has just been created"
fi fi
if [[ -z $diff ]]; then # check for difference if [[ -z $diff ]]; then # check for difference