dont remove old htaccess

This commit is contained in:
Luke Smith 2018-12-18 09:32:00 -05:00
parent 19c884c49a
commit 70933149cb
No known key found for this signature in database
GPG Key ID: 4C50B54A911F6252
1 changed files with 0 additions and 2 deletions

2
lb
View File

@ -49,7 +49,6 @@ publish() { \
sed -i "/<!-- LB -->/r $tmpdir/html" "$blogfile"
sed -i "/<!-- LB -->/r $tmpdir/rss" "$rssfile"
sed -i "/<!-- LB -->/r $tmpdir/index" "$indexfile"
sed -i "/ \"$basefile/d" "$webdir/blog/.htaccess"
printf "AddDescription \"%s\" \"%s\" #%s" "$realname" "$basefile" "$rssdate" >> "$webdir/blog/.htaccess"
rm -f "$webdir/blog/.drafts/$chosen"
}
@ -60,7 +59,6 @@ delete() { \
sed -i "/<item/{:a;N;/<\\/item>/!ba};/#$base.html<\\/guid/d" $rssfile
sed -i "/<div/{:a;N;/<\\/div>/!ba};/id='$base'/d" $blogfile
sed -i "/<li>.*<a href=\"blog\\/$base.html\">/d" $indexfile
sed -i "\"$base.html\"" "$webdir/blog/.htaccess"
rm "$webdir/blog/$basefile" 2>/dev/null && printf "Old blog entry removed.\\n" ;}
revise() { awk '/^<small>\[/{flag=1;next}/<footer>/{flag=0}flag' "$webdir/blog/$chosen" > "$webdir/blog/.drafts/$basefile"