File: default-dir

package info (click to toggle)
gap-atlasrep 2.1.6-1
  • links: PTS
  • area: main
  • in suites: bookworm
  • size: 8,644 kB
  • sloc: xml: 20,907; javascript: 155; makefile: 117; sh: 1
file content (29 lines) | stat: -rw-r--r-- 1,006 bytes parent folder | download
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
Index: gap-atlasrep-2.1.6/init.g
===================================================================
--- gap-atlasrep-2.1.6.orig/init.g
+++ gap-atlasrep-2.1.6/init.g
@@ -5,6 +5,24 @@
 #Y  Copyright (C)  2001,   Lehrstuhl D für Mathematik,  RWTH Aachen,  Germany
 ##
 
+if UserPreference( "AtlasRep", "AtlasRepDataDirectory") = fail then
+  CallAndInstallPostRestore(function()
+    Perform(["datagens", "dataword", "dataext"], function(dirname)
+      local package, l, dir;
+      package := "AtlasRep";
+      dir := GAPInfo.UserGapRoot;
+      for l in ["","pkg",package,dirname] do
+        dir := Concatenation([dir,"/",l]);
+        if not IsDirectoryPath(dir) then
+          CreateDir(dir);
+        fi;
+      od;
+      return 0;
+    end);
+    SetUserPreference( "AtlasRep", "AtlasRepDataDirectory",Concatenation(GAPInfo.UserGapRoot,"/pkg/AtlasRep/"));
+  end);
+fi;
+
 # Read the declaration part.
 ReadPackage( "atlasrep", "gap/userpref.g"  );
 ReadPackage( "atlasrep", "gap/bbox.gd"     );