File: install2

package info (click to toggle)
filtermail 1.06.00-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,688 kB
  • sloc: cpp: 2,487; fortran: 249; makefile: 106; ansic: 51; sh: 36
file content (33 lines) | stat: -rw-r--r-- 658 bytes parent folder | download | duplicates (2)
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);
}