~moody/rc-gemd

ref: bf0e251a82566f044f228771981a301797e807af rc-gemd/select-handler -rwxr-xr-x 312 bytes
bf0e251aMoody Remove tlsshim and add proper directions for adding tls key to hostowner's factotum 1 year, 30 days ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#!/bin/rc
fs_root=/lib/gem
if(~ $location /)
	location=/index.gem

if(~ $location /search){
	. $rc_gemd_dir/handlers/require-input 'Input a search query'
	echo 20^' '^'text/gemini'^$cr
	sq=`{echo $query | urlencode -d}
	ls $fs_root | grep $"sq | sed '
		s,^'$fs_root'/,,g
		s,^,=> ,g'
	exit
}

exec serve-static