1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33
|
void install(string dest)
{
string target;
list pathsplit;
string base;
base = "tmp/install/";
md(base);
target = base + BINARY;
pathsplit = path_file(target);
printf(" installing the executable `", target, "'\n");
logFile("tmp/bin", "binary", pathsplit[0], pathsplit[1]);
chdir(g_cwd);
if (dest == "")
dest = "/";
else
md(dest);
dest = cutEoln(backtick("realpath " + dest)[0]);
if (g_logPath != "")
backtick("icmake/log " + dest + " " + g_logPath);
run("tar cf - -Ctmp/install . | tar xf - -C" + dest);
printf("\n Installation completed\n");
exit(0);
}
|