~moody/rc-gemd

ref: 28f8522e82af8bc65cb9dbf5e99ebf02433c42e1 rc-gemd/rc-gemd -rwxr-xr-x 359 bytes
28f8522eMoody Add LICENSE and README 11 months ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!/bin/rc
rc_gemd_dir=/rc/bin/rc-gemd
path=(/bin $rc_gemd_dir/handlers)
cr=

url=`{sed 's/'$cr'//;1q'}
if(~ $url *://*){
	scheme=`{echo $url | sed 's,://.*,,g'}
	url=`{echo $url | sed 's,'^$scheme^'://,,'}
}
if not
	scheme='gemini://'

server_name=`{echo $url | sed 's,/.*,,'}
location=`{echo $url | sed 's,[a-zA-Z0-9.]+/,/,'}

. $rc_gemd_dir/select-handler