31 lines
573 B
Odin
31 lines
573 B
Odin
package cmd
|
|
|
|
import "../deamon"
|
|
|
|
import "core:os"
|
|
import "core:log"
|
|
import "core:hash/xxhash"
|
|
import "core:encoding/base64"
|
|
|
|
Options :: struct {
|
|
deamon: bool,
|
|
}
|
|
|
|
main :: proc() {
|
|
context.logger = log.create_console_logger()
|
|
defer log.destroy_console_logger(context.logger)
|
|
d, _ := os.read_entire_file_or_err(os.args[1])
|
|
defer delete(d)
|
|
|
|
hash := xxhash.XXH3_128(d)
|
|
hash_bytes := transmute([size_of(hash)]u8)hash
|
|
data, _ := base64.encode(hash_bytes[:])
|
|
base64.ENC_TABLE
|
|
|
|
log.infof("%q", data)
|
|
|
|
|
|
//
|
|
// deamon.handle_inotify()
|
|
}
|