/* This file is part of Bolixo. Bolixo is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. Bolixo is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Bolixo. If not, see . */ /* Adapt a secret.* file for development mode using overrides (devconfig) */ #include #include #include #include #include #include using namespace std; int main (int argc, char *argv[]) { glocal int ret = -1; glocal const char *devdir = nullptr; glocal.ret = (argc,argv); setproginfo ("patch-secrets","0.0","..."); setarg (' ',"devdir","Directory holding the overriden services",glocal.devdir,true); int ret = -1; ("-",true); const char *pt; if (is_start_any_of(line,pt,"unix:/tmp")){ if (is_start_any_of(pt,NONEED,"/bod")){ printf ("unix:%s/bod/rootfs/tmp%s\n",glocal.devdir,pt); }else if (is_start_any_of(pt,NONEED,"/writed")){ printf ("unix:%s/writed/rootfs/tmp%s\n",glocal.devdir,pt); }else if (is_start_any_of(pt,NONEED,"/bolixod")){ printf ("unix:%s/bolixod/rootfs/tmp%s\n",glocal.devdir,pt); }else if (is_start_any_of(pt,NONEED,"/document")){ printf ("unix:%s/documentd/rootfs/tmp%s\n",glocal.devdir,pt); }else if (is_start_any_of(pt,NONEED,"/session")){ printf ("unix:%s/sessiond/rootfs/tmp%s\n",glocal.devdir,pt); }else if (is_start_any_of(pt,NONEED,"/publish")){ printf ("unix:%s/publishd/rootfs/tmp%s\n",glocal.devdir,pt); }else{ printf ("%s\n",line); } }else{ printf ("%s\n",line); } return 0; return ret; return glocal.ret; }