Created
September 13, 2020 19:41
-
-
Save nytpu/bc3a8f2f0384be739d2595bd867fece1 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env sh | |
# a very basic gemini cgi script | |
# taken from an old commit of bashblog (https://tildegit.org/team/bashblog) | |
# send gemini response header | |
printf "20 text/gemini\r\n" | |
printf "my bashblog posts\r\n" | |
user=$(stat -c '%U' .) | |
for post in $(ls -t *.md); do | |
post=$(basename $post) | |
printf "=> /~$user/blog/$post $post\r\n" | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment