lb

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

commit 87046cffe94904f46f2d812f8ce69eae1404558b
parent 565f507b9502855dfee739164cf9645b5ccec39e
Author: Luke Smith <luke@lukesmith.xyz>
Date:   Wed, 17 Oct 2018 06:53:10 -0400

fix of duplicate deletion

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

diff --git a/lb b/lb @@ -73,8 +73,8 @@ delete() { \ base=$(basename $(echo "$chosen" | cut -f1 -d'.')) read -rp "Really delete \"$base\"? (y/N) " choice [[ $choice =~ [Yy] ]] || exit - 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 "/<item/{:a;N;/<\/item>/!ba};/#$base<\/guid/d" $rssfile && echo "Entry removed from RSS feed file." + sed -i "/<div/{:a;N;/<\/div>/!ba};/id='$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." }