275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
|
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
|
+
-
-
-
+
+
+
-
+
+
+
+
+
+
|
set data [split $data ","]
lappend data $cert
lappend data $signature
set data [join $data ","]
if {![info exists ::env(APPFS_SIGN_IN_PLACE)]} {
set fd [open "$::env(SITE_INDEX_FILE).new" "w"]
puts $fd $data
close $fd
set fd [open "$::env(SITE_INDEX_FILE).new" "w" 0644]
puts $fd $data
close $fd
file rename -force -- "$::env(SITE_INDEX_FILE).new" $::env(SITE_INDEX_FILE)
file rename -force -- "$::env(SITE_INDEX_FILE).new" $::env(SITE_INDEX_FILE)
} else {
set fd [open "$::env(SITE_INDEX_FILE)" "w" 0644]
puts $fd $data
close $fd
}
_EOF_
)"
}
cmd="$1"
shift
|