File: default-dir

package info (click to toggle)
gap-atlasrep 2.1.9-1
  • links: PTS
  • area: main
  • in suites: forky, sid, trixie
  • size: 8,688 kB
  • sloc: xml: 20,993; javascript: 155; makefile: 113; sh: 1
file content (29 lines) | stat: -rw-r--r-- 1,005 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.7/init.g
===================================================================
--- gap-atlasrep-2.1.7.orig/init.g
+++ gap-atlasrep-2.1.7/init.g
@@ -3,6 +3,24 @@
 #W  init.g               GAP 4 package AtlasRep                 Thomas Breuer
 ##
 
+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"     );