converted tabs to spaces in accordance with vim modeline
This commit is contained in:
parent
b9769ee028
commit
1226e78561
33
bb.sh
33
bb.sh
|
@ -156,11 +156,11 @@ global_variables() {
|
|||
# Check for the validity of some variables
|
||||
# DO NOT EDIT THIS FUNCTION unless you know what you're doing
|
||||
global_variables_check() {
|
||||
[[ $header_file == .header.html ]] &&
|
||||
echo "Please check your configuration. '.header.html' is not a valid value for the setting 'header_file'" &&
|
||||
[[ $header_file == .header.html ]] && \
|
||||
echo "Please check your configuration. '.header.html' is not a valid value for the setting 'header_file'" && \
|
||||
exit
|
||||
[[ $footer_file == .footer.html ]] &&
|
||||
echo "Please check your configuration. '.footer.html' is not a valid value for the setting 'footer_file'" &&
|
||||
[[ $footer_file == .footer.html ]] && \
|
||||
echo "Please check your configuration. '.footer.html' is not a valid value for the setting 'footer_file'" && \
|
||||
exit
|
||||
}
|
||||
|
||||
|
@ -217,6 +217,7 @@ get_html_file_content() {
|
|||
edit() {
|
||||
[[ ! -f "${1%%.*}.html" ]] && \
|
||||
printf "Can't edit post \"%s.html\", did you mean to use \"bb.sh post <draft_file>\"?\\n" "${1%%.*}" && exit 1
|
||||
|
||||
# Original post timestamp
|
||||
edit_timestamp=$(LC_ALL=C date -r "${1%%.*}.html" +"$date_format_full" )
|
||||
touch_timestamp=$(LC_ALL=C date -r "${1%%.*}.html" +"$date_format_timestamp")
|
||||
|
@ -436,11 +437,8 @@ parse_file() {
|
|||
filename=$3
|
||||
else
|
||||
filename=$title
|
||||
[[ -n $convert_filename ]] &&
|
||||
filename=$(echo "$title" | eval "$convert_filename")
|
||||
[[ -n $filename ]] ||
|
||||
filename=$RANDOM # don't allow empty filenames
|
||||
|
||||
[[ -n $convert_filename ]] && filename=$(echo "$title" | eval "$convert_filename")
|
||||
[[ -n $filename ]] || filename=$RANDOM # don't allow empty filenames
|
||||
filename=$filename.html
|
||||
|
||||
# Check for duplicate file names
|
||||
|
@ -504,6 +502,7 @@ as you exit your editor.</p>
|
|||
|
||||
<p>$template_tags_line_header keep-this-tag-format, tags-are-optional, example</p>
|
||||
EOF
|
||||
|
||||
[[ $fmt == md ]] && cat << EOF >> "$TMPFILE"
|
||||
The rest of the text file is a **Markdown** blog post. The process will continue
|
||||
as soon as you exit your editor.
|
||||
|
@ -877,7 +876,7 @@ make_gophermap() {
|
|||
post=$(basename $post)
|
||||
printf "0$post\t/~$user/blog/$post\ttilde.team\t70\n"
|
||||
done
|
||||
EOF
|
||||
EOF
|
||||
chmod +x "${HOME}/public_html/blog/${gophermap}"
|
||||
fi
|
||||
chmod 644 ./*.md
|
||||
|
@ -903,7 +902,7 @@ make_gemini() {
|
|||
post=$(basename $post)
|
||||
printf "=> /~$user/blog/$post $post\r\n"
|
||||
done
|
||||
EOF
|
||||
EOF
|
||||
chmod +x "${HOME}/public_gemini/blog/${gemini_index}"
|
||||
fi
|
||||
}
|
||||
|
@ -915,8 +914,10 @@ create_includes() {
|
|||
echo "<div id=\"description\">$global_description</div>"
|
||||
} > ".title.html"
|
||||
|
||||
if [[ -f $header_file ]]; then cp "$header_file" .header.html
|
||||
else {
|
||||
if [[ -f $header_file ]]; then
|
||||
cp "$header_file" .header.html
|
||||
else
|
||||
{
|
||||
echo '<!DOCTYPE html>'
|
||||
echo '<html lang="en"><head>'
|
||||
echo '<meta charset="UTF-8">'
|
||||
|
@ -930,8 +931,10 @@ create_includes() {
|
|||
} > ".header.html"
|
||||
fi
|
||||
|
||||
if [[ -f $footer_file ]]; then cp "$footer_file" .footer.html
|
||||
else {
|
||||
if [[ -f $footer_file ]]; then
|
||||
cp "$footer_file" .footer.html
|
||||
else
|
||||
{
|
||||
protected_mail=${global_email//@/@}
|
||||
protected_mail=${protected_mail//./.}
|
||||
echo "<div id=\"footer\">$global_license <a href=\"$global_author_url\">$global_author</a> — <a href=\"mailto:$protected_mail\">$protected_mail</a><br>"
|
||||
|
|
Loading…
Reference in New Issue