[4d64af]: post_install.m  Maximize  Restore  History

Download this file

96 lines (74 with data), 3.2 kB

 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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
function post_install (desc)
include = fullfile (desc.dir, "include");
[status, msg] = mkdir (include);
if (status != 1)
error ("couldn't create include/ directory: %s", msg);
endif
private = fullfile (include, "fem-fenics");
[status, msg] = mkdir (private);
if (status != 1)
error ("couldn't create include/fem-fenics/ directory: %s", msg);
endif
[status, msg, msgid] = movefile ('./src/*.h', private, 'f');
if (status != 1)
error ("couldn't copy file: %s", msg);
endif
# status = movefile ('./inst/generate_lhs.m', private, 'f');
# status += movefile ('./inst/generate_rhs.m', private, 'f');
# status += movefile ('./inst/generate_fs.m', private, 'f');
# status += movefile ('./inst/generate_fun.m', private, 'f');
# status += movefile ('./inst/generate_makefile.m', private, 'f');
# if (status != 5)
# error ("couldn't copy file: %s", msg);
# endif
# func = fullfile (desc.dir, "@function");
# [status, msg] = mkdir (func);
# if (status != 1)
# error ("couldn't create @function directory: %s", msg);
# endif
# mesh = fullfile (desc.dir, "@mesh");
# [status, msg] = mkdir (mesh);
# if (status != 1)
# error ("couldn't create @function directory: %s", msg);
# endif
# [status, msg, msgid] = movefile ('./src/feval.oct', func, 'f');
# if (status != 1)
# error ("couldn't copy file: %s", msg);
# endif
# [status, msg, msgid] = movefile ('./src/save.oct', func, 'f');
# if (status != 1)
# error ("couldn't copy file: %s", msg);
# endif
# new_name = fullfile (func, 'plot.oct');
# [status, msg, msgid] = movefile ('./src/plot_func.oct', new_name, 'f');
# if (status != 1)
# error ("couldn't copy file: %s", msg);
# endif
# new_name = fullfile (mesh, 'plot.oct');
# [status, msg, msgid] = movefile ('./src/plot_mesh.oct', new_name, 'f');
# if (status != 1)
# error ("couldn't copy file: %s", msg);
# endif
# file = cstrcat (desc.archprefix, filesep, octave_config_info ("canonical_host_type"),
# "-", octave_config_info ("api_version"), filesep, "feval.oct");
# [err, msg] = unlink (file);
# file = cstrcat (desc.archprefix, filesep, octave_config_info ("canonical_host_type"),
# "-", octave_config_info ("api_version"), filesep, "save.oct");
# [err, msg] = unlink (file);
# file = cstrcat (desc.archprefix, filesep, octave_config_info ("canonical_host_type"),
# "-", octave_config_info ("api_version"), filesep, "plot_mesh.oct");
# [err, msg] = unlink (file);
# file = cstrcat (desc.archprefix, filesep, octave_config_info ("canonical_host_type"),
# "-", octave_config_info ("api_version"), filesep, "plot_func.oct");
# [err, msg] = unlink (file);
# file = cstrcat (desc.archprefix, filesep, "generate_lhs.m");
# [err, msg] = unlink (file);
# file = cstrcat (desc.archprefix, filesep, "generate_rhs.m");
# [err, msg] = unlink (file);
# file = cstrcat (desc.archprefix, filesep, "generate_fun.m");
# [err, msg] = unlink (file);
# file = cstrcat (desc.archprefix, filesep, "generate_fs.m");
# [err, msg] = unlink (file);
# file = cstrcat (desc.archprefix, filesep, "generate_makefile.m");
# [err, msg] = unlink (file);
endfunction