#include<stdint.h>#include<stddef.h>#include<unistd.h>#include<string.h>#include"common.h"#include"types.h"#include"repository.h"#include"db.h"staticvoidformatdbpath(char*dst,constchar*repodir){char*p;/* TODO find better ways to format paths */
p =stpncpy(dst, repodir, PATH_MAX);*p++='/';
p =stpncpy(p, DOTPIJUL,6);*p++='/';
p =stpncpy(p,"pristine/db",11);}intcmd_pristine(intargc,char*argv,struct repository *repo){char dbpath[4096]={0};(void)argc;(void)argv;formatdbpath(dbpath, repo->path);dbrun(dbpath);return0;}