Check-in [5c9ce56320]
Overview
Comment:Added basic pure-Tcl sha1 fallback implementation
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 5c9ce5632001fd73047c31ecb60e52a6367fc93f
User & Date: rkeene on 2014-11-04 01:16:01.686
Other Links: manifest | tags
Context
2014-11-05
18:39
Updated to hide commands which are not used and may cause slow-ness check-in: c3c642f5c8 user: rkeene tags: trunk
2014-11-04
01:16
Added basic pure-Tcl sha1 fallback implementation check-in: 5c9ce56320 user: rkeene tags: trunk
2014-11-03
22:59
Updated to complain if hash cannot be computed check-in: 0cefa306d2 user: rkeene tags: trunk
Changes
Modified Makefile from [fe29eeac49] to [bee1193267].
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41

appfsd: appfsd.o
	$(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) -o appfsd appfsd.o $(LIBS)

appfsd.o: appfsd.c appfsd.tcl.h
	$(CC) $(CPPFLAGS) $(CFLAGS) -o appfsd.o -c appfsd.c

appfsd.tcl.h: appfsd.tcl
	sed 's@[\\"]@\\&@g;s@^@   "@;s@$$@\\n"@' appfsd.tcl > appfsd.tcl.h.new
	mv appfsd.tcl.h.new appfsd.tcl.h

install: appfsd
	if [ ! -d '$(DESTDIR)$(sbindir)' ]; then mkdir -p '$(DESTDIR)$(sbindir)'; chmod 755 '$(DESTDIR)$(sbindir)'; fi
	cp appfsd '$(DESTDIR)$(sbindir)/'

clean:







|
|







26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41

appfsd: appfsd.o
	$(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) -o appfsd appfsd.o $(LIBS)

appfsd.o: appfsd.c appfsd.tcl.h
	$(CC) $(CPPFLAGS) $(CFLAGS) -o appfsd.o -c appfsd.c

appfsd.tcl.h: appfsd.tcl sha1.tcl
	sed '/@@SHA1\.TCL@@/ r sha1.tcl' appfsd.tcl | sed '/@@SHA1\.TCL@@/ d' | sed 's@[\\"]@\\&@g;s@^@   "@;s@$$@\\n"@' > appfsd.tcl.h.new
	mv appfsd.tcl.h.new appfsd.tcl.h

install: appfsd
	if [ ! -d '$(DESTDIR)$(sbindir)' ]; then mkdir -p '$(DESTDIR)$(sbindir)'; chmod 755 '$(DESTDIR)$(sbindir)'; fi
	cp appfsd '$(DESTDIR)$(sbindir)/'

clean:
1
2
3
4


5




6
7
8
9
10
11
12
#! /usr/bin/env tclsh

package require http 2.7
package require sqlite3


package require sha1





namespace eval ::appfs {
	variable cachedir "/tmp/appfs-cache"
	variable ttl 3600
	variable nttl 60

	proc _hash_sep {hash {seps 4}} {




>
>
|
>
>
>
>







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#! /usr/bin/env tclsh

package require http 2.7
package require sqlite3

if {[catch {
	package require sha1
}]} {
	@@SHA1.TCL@@
	package require sha1
}

namespace eval ::appfs {
	variable cachedir "/tmp/appfs-cache"
	variable ttl 3600
	variable nttl 60

	proc _hash_sep {hash {seps 4}} {
Added sha1.tcl version [a8b3b2afbe].