forked from team/bashblog
Various syntax and style fixes in gopher and gemini routines
This commit is contained in:
parent
a2b7f9e513
commit
5f93c05f07
14
bb.sh
14
bb.sh
|
@ -863,17 +863,17 @@ make_gophermap() {
|
||||||
ln -s "${HOME}/public_html/blog/" "${HOME}/public_gopher/blog"
|
ln -s "${HOME}/public_html/blog/" "${HOME}/public_gopher/blog"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ ! -f "${HOME}/public_gopher/blog/gophermap" ]; then
|
if [ ! -f "${HOME}/public_gopher/blog/$gophermap" ]; then
|
||||||
cat <<- 'EOF' > $HOME/public_html/blog/gophermap
|
cat <<- 'EOF' > $HOME/public_html/blog/$gophermap
|
||||||
#!/bin/bash
|
#!/usr/bin/env sh
|
||||||
echo -e "my bashblog posts\n"
|
printf "my bashblog posts\n"
|
||||||
user=$(stat -c '%U' .)
|
user=$(stat -c '%U' .)
|
||||||
for post in $(ls -t *.md); do
|
for post in $(ls -t *.md); do
|
||||||
post=$(basename $post)
|
post=$(basename $post)
|
||||||
echo -e "0$post\t/~$user/blog/$post\ttilde.team\t70"
|
printf "0$post\t/~$user/blog/$post\ttilde.team\t70\n"
|
||||||
done
|
done
|
||||||
EOF
|
EOF
|
||||||
chmod +x $HOME/public_html/blog/gophermap
|
chmod +x $HOME/public_html/blog/$gophermap
|
||||||
fi
|
fi
|
||||||
chmod 644 *.md
|
chmod 644 *.md
|
||||||
}
|
}
|
||||||
|
@ -890,7 +890,7 @@ make_gemini() {
|
||||||
|
|
||||||
if [ ! -f "${HOME}/public_gemini/blog/$gemini_index" ]; then
|
if [ ! -f "${HOME}/public_gemini/blog/$gemini_index" ]; then
|
||||||
cat <<- 'EOF' > $HOME/public_gemini/blog/$gemini_index
|
cat <<- 'EOF' > $HOME/public_gemini/blog/$gemini_index
|
||||||
#!/bin/bash
|
#!/usr/bin/env sh
|
||||||
printf "20 text/gemini\r\n"
|
printf "20 text/gemini\r\n"
|
||||||
printf "my bashblog posts\r\n"
|
printf "my bashblog posts\r\n"
|
||||||
user=$(stat -c '%U' $0)
|
user=$(stat -c '%U' $0)
|
||||||
|
|
Loading…
Reference in New Issue