| 1 |
void _installYodl2(string where) |
| 2 |
{ |
| 3 |
list conversions; |
| 4 |
int idx; |
| 5 |
|
| 6 |
conversions = strtok(STD_CONVERSIONS, " "); |
| 7 |
|
| 8 |
for (idx = listlen(conversions); idx--; ) |
| 9 |
run("ln -sf yodl2whatever " + where + BIN + "/yodl2" + |
| 10 |
conversions[idx]); |
| 11 |
|
| 12 |
run("chmod +x " + where + BIN + "/yodl2*"); |
| 13 |
} |
| 14 |
|
| 15 |
void _installYodlConverters(string where, int debian) |
| 16 |
{ |
| 17 |
list conversions; |
| 18 |
int idx; |
| 19 |
|
| 20 |
conversions = (list)"whatever" + strtok(STD_CONVERSIONS, " "); |
| 21 |
|
| 22 |
string gzipped; |
| 23 |
|
| 24 |
if (debian == 1) |
| 25 |
gzipped = ".1.gz "; |
| 26 |
else |
| 27 |
gzipped = ".1 "; |
| 28 |
|
| 29 |
for (idx = listlen(conversions); idx--; ) |
| 30 |
run("ln -sf yodlconverters" + gzipped + |
| 31 |
where + MAN + "/man1/yodl2" + conversions[idx] + gzipped); |
| 32 |
} |
| 33 |
|
| 34 |
void installExit(string what, string where) |
| 35 |
{ |
| 36 |
if (what == "programs") |
| 37 |
{ |
| 38 |
md(where + BIN); |
| 39 |
run("cp " + g_install + BIN + "/* " + where + BIN); |
| 40 |
run("chmod +x " + where + BIN + "/yodlstriproff"); |
| 41 |
_installYodl2(where); |
| 42 |
|
| 43 |
exit(0); |
| 44 |
} |
| 45 |
|
| 46 |
if (what == "yodl") |
| 47 |
{ |
| 48 |
md(where + BIN); |
| 49 |
run("cp " + g_install + BIN + "/yodl " + where + BIN); |
| 50 |
exit(0); |
| 51 |
} |
| 52 |
|
| 53 |
if (what == "yodlpost") |
| 54 |
{ |
| 55 |
md(where + BIN); |
| 56 |
run("cp " + g_install + BIN + "/yodlpost " + where + BIN); |
| 57 |
exit(0); |
| 58 |
} |
| 59 |
|
| 60 |
if (what == "yodlverbinsert") |
| 61 |
{ |
| 62 |
md(where + BIN); |
| 63 |
run("cp " + g_install + BIN + "/yodlverbinsert " + where + BIN); |
| 64 |
exit(0); |
| 65 |
} |
| 66 |
|
| 67 |
if (what == "yodlstriproff") |
| 68 |
{ |
| 69 |
md(where + BIN); |
| 70 |
run("cp " + g_install + BIN + "/yodlstriproff " + where + BIN); |
| 71 |
run("chmod +x " + where + BIN + "/yodlstriproff"); |
| 72 |
exit(0); |
| 73 |
} |
| 74 |
|
| 75 |
if (what == "yodl2whatever") |
| 76 |
{ |
| 77 |
md(where + BIN); |
| 78 |
run("cp " + g_install + BIN + "/yodl2whatever " + where + BIN); |
| 79 |
|
| 80 |
_installYodl2(where); |
| 81 |
exit(0); |
| 82 |
} |
| 83 |
|
| 84 |
int debian = 0; |
| 85 |
|
| 86 |
if (what == "mandeb") |
| 87 |
{ |
| 88 |
debian = 1; |
| 89 |
what = "man"; |
| 90 |
} |
| 91 |
|
| 92 |
if (what == "man") |
| 93 |
{ |
| 94 |
md(where + MAN); |
| 95 |
run("cp -r " + g_install + MAN + "/* " + where + MAN); |
| 96 |
_installYodlConverters(where, debian); // debian: .gz links to |
| 97 |
// yodlconverters.1.gz |
| 98 |
exit(0); |
| 99 |
} |
| 100 |
|
| 101 |
if (what == "manual") |
| 102 |
{ |
| 103 |
md(where + DOCDOC); |
| 104 |
run("cp -r " + g_install + DOCDOC + "/* " + where + DOCDOC); |
| 105 |
run("cp AUTHORS.txt CHANGES changelog " + where + DOCDOC); |
| 106 |
exit(0); |
| 107 |
} |
| 108 |
|
| 109 |
if (what == "macros") |
| 110 |
{ |
| 111 |
md(where + STD_INCLUDE); |
| 112 |
run("cp -r " + g_install + STD_INCLUDE + "/* " + where + STD_INCLUDE); |
| 113 |
exit(0); |
| 114 |
} |
| 115 |
|
| 116 |
if (what == "docs") |
| 117 |
{ |
| 118 |
md(where + DOC); |
| 119 |
run("cp AUTHORS.txt CHANGES changelog " + where + DOC); |
| 120 |
exit(0); |
| 121 |
} |
| 122 |
} |