diff options
author | Peter Harris <pharris@opentext.com> | 2015-02-18 15:41:31 -0500 |
---|---|---|
committer | Peter Harris <pharris@opentext.com> | 2015-02-18 15:41:31 -0500 |
commit | 006bd4d0628c30b42ebee4f8fe4f4807028ca329 (patch) | |
tree | 834d4fff40df2b2386cd411a074db7364b0b04f6 | |
parent | ac3f6c587ddc55fcae157a895aa6d3413596fb30 (diff) |
Add -stripfont flag
Other common font path strings include "xtsfonts" and "user".
-rw-r--r-- | config.go | 6 | ||||
-rw-r--r-- | run.go | 2 |
2 files changed, 7 insertions, 1 deletions
@@ -2,6 +2,7 @@ package main import ( "bufio" + "flag" "fmt" "io/ioutil" "log" @@ -15,6 +16,8 @@ import ( "github.com/BurntSushi/xgb/xproto" ) +var stripfont = flag.String("stripfont", "xtest", "Remove font directories with this substring") + func createConfig(outdir string) error { // xgb logs when it cannot find Xauthority, which is // every time when running into a remote Exceed @@ -129,9 +132,10 @@ func createConfig(outdir string) error { // xtest fonts on the font path before running xts-config. set["XT_FONTPATH"] = fontPath list = list[:0] + *stripfont = strings.ToLower(*stripfont) for _, v := range gfp.Path { // Remove xtest directory - if !strings.Contains(strings.ToLower(v.Name), "xtest") { + if !strings.Contains(strings.ToLower(v.Name), *stripfont) { list = append(list, v.Name) } } @@ -10,6 +10,8 @@ // - Adds ability to run a single (or multiple) sub-test(s) (similar to run_assert) // // - Avoids shelling out to xts-config (and therefore xset/xdpyinfo) (faster remote startup) +// +// - Allows the user to configure the stripped font path for remote servers package main import ( |