Use CGI for Gemini and various style and syntax changes #3
14
bb.sh
14
bb.sh
|
@ -863,17 +863,17 @@ make_gophermap() {
|
|||
ln -s "${HOME}/public_html/blog/" "${HOME}/public_gopher/blog"
|
||||
fi
|
||||
|
||||
if [ ! -f "${HOME}/public_gopher/blog/gophermap" ]; then
|
||||
cat <<- 'EOF' > $HOME/public_html/blog/gophermap
|
||||
#!/bin/bash
|
||||
echo -e "my bashblog posts\n"
|
||||
if [ ! -f "${HOME}/public_gopher/blog/$gophermap" ]; then
|
||||
cat <<- 'EOF' > $HOME/public_html/blog/$gophermap
|
||||
#!/usr/bin/env sh
|
||||
printf "my bashblog posts\n"
|
||||
user=$(stat -c '%U' .)
|
||||
for post in $(ls -t *.md); do
|
||||
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
|
||||
EOF
|
||||
chmod +x $HOME/public_html/blog/gophermap
|
||||
chmod +x $HOME/public_html/blog/$gophermap
|
||||
fi
|
||||
chmod 644 *.md
|
||||
}
|
||||
|
@ -890,7 +890,7 @@ make_gemini() {
|
|||
|
||||
if [ ! -f "${HOME}/public_gemini/blog/$gemini_index" ]; then
|
||||
cat <<- 'EOF' > $HOME/public_gemini/blog/$gemini_index
|
||||
#!/bin/bash
|
||||
#!/usr/bin/env sh
|
||||
printf "20 text/gemini\r\n"
|
||||
printf "my bashblog posts\r\n"
|
||||
user=$(stat -c '%U' $0)
|
||||
|
|
Loading…
Reference in New Issue