diff --git a/etc/gaplint.sh b/etc/gaplint.sh new file mode 100755 index 0000000..0d8af69 --- /dev/null +++ b/etc/gaplint.sh @@ -0,0 +1,4 @@ +#!/bin/bash +set -e + +gaplint --disable W004 $@ *.g gap/* read.g init.g PackageInfo.g makedoc.g tst/testall.g tst/*.tst tst/examples/*.tst diff --git a/gap/splash.gi b/gap/splash.gi index 70801a5..387bb52 100644 --- a/gap/splash.gi +++ b/gap/splash.gi @@ -25,13 +25,11 @@ if not IsBound(Splash) then ErrorNoReturn("the 2nd argument must be a record,"); fi; - path := UserHomeExpand("~/"); if IsBound(opt.path) then path := opt.path; fi; - if IsBound(opt.directory) then if not opt.directory in DirectoryContents(path) then Exec(Concatenation("mkdir ", path, opt.directory)); @@ -47,13 +45,11 @@ if not IsBound(Splash) then dir := Filename(tdir, ""); fi; - file := "vizpicture"; if IsBound(opt.filename) then file := opt.filename; fi; - if IsBound(opt.viewer) then viewer := opt.viewer; if not IsString(viewer) then @@ -73,7 +69,6 @@ if not IsBound(Splash) then fi; fi; - if IsBound(opt.type) and (opt.type = "latex" or opt.type = "dot") then type := opt.type; elif Length(str) >= 6 and str{[1 .. 6]} = "%latex" then @@ -90,14 +85,12 @@ if not IsBound(Splash) then inn := Concatenation(dir, file, ".dot"); fi; - filetype := "pdf"; if IsBound(opt.filetype) and IsString(opt.filetype) and type <> "latex" then filetype := opt.filetype; fi; out := Concatenation(dir, file, ".", filetype); - engine := "dot"; if IsBound(opt.engine) then engine := opt.engine; @@ -110,16 +103,11 @@ if not IsBound(Splash) then fi; fi; - FileString(inn, str); if type = "latex" then - - Exec(Concatenation("cd ", dir, ";", "pdflatex ", file, " 2>/dev/null 1>/dev/null")); else - - Exec(Concatenation(engine, " -T", filetype, " ", inn, " -o ", out)); fi; Exec(Concatenation(viewer, " ", out, " 2>/dev/null 1>/dev/null &"));