fix bb.sh

This commit is contained in:
creme 2020-08-09 22:43:40 +02:00
parent 39cb6edf61
commit ad71aba24e
Signed by: creme
GPG Key ID: C147C3B7FBDF08D0
1 changed files with 913 additions and 914 deletions

11
bb.sh
View File

@ -1178,10 +1178,10 @@ date_version_detect() {
do_main() {
# make sure we're in the right directory
[ $(pwd) != $HOME/public_html/blog ] &&
echo "you're not in your blog directory. moving you there now" && cd $HOME/public_html/blog
mkdir -p $HOME/public_html/blog
echo "you're not in your blog directory. moving you there now"
test -d $HOME/public_html/blog || mkdir -p $HOME/public_html/blog
test -f $HOME/public_html/blog/.config || cp /usr/local/bin/bb_user_config.tmpl $HOME/public_html/blog/.config
cd $HOME/public_html/blog
)
# Detect if using BSD date or GNU date
date_version_detect
@ -1246,6 +1246,8 @@ do_main() {
all_posts
all_tags
make_rss
make_gophermap
make_gemini
delete_includes
}
@ -1254,9 +1256,6 @@ do_main() {
# MAIN
# Do not change anything here. If you want to modify the code, edit do_main()
#
test -d ~/public_html/blog || mkdir -p ~/public_html/blog
test -f ~/public_html/blog/.config || cp /usr/local/bin/bb_user_config.tmpl ~/public_html/blog/.config
cd ~/public_html/blog
do_main "$@"
# vim: set shiftwidth=4 tabstop=4 expandtab: