lb

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

commit 21cbc410afe2dc6bc2a09d4e2b8b6bc37fa603c3
parent fb1a0630ed9d4157c876ded500bfb7262a55cf4c
Author: Luke Smith <luke@lukesmith.xyz>
Date:   Mon,  3 Sep 2018 10:18:49 -0400

delete fix

Diffstat:
Mlb | 4++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lb b/lb @@ -60,13 +60,13 @@ finalize() { \ delete() { \ listandReturn "$blogdir/*.html" delete - base=$(echo "$chosen" | cut -f1 -d'.') + base=$(basename $(echo "$chosen" | cut -f1 -d'.')) read -rp "Really delete \"$base\"? (y/N) " choice [[ $choice =~ [Yy] ]] || exit - rm "$blogdir"/"$chosen" && echo "Blog post deleted from directories." sed -i "/<item/{:a;N;/<\/item>/!ba};/$base/d" $rssfile && echo "Entry removed from RSS feed file." sed -i "/<div/{:a;N;/<\/div>/!ba};/$base/d" $blogfile && echo "HTML code removed from blogfile." sed -i "/<li>.*<a href=\"blog\/$base.html\">/d" $indexfile && echo "Index file entry removed." + rm "$chosen" && echo "Blog post deleted from directories." } discard() { \