Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

[dbee7d]: pre_install.m Maximize Restore History

Download this file

pre_install.m    30 lines (22 with data), 768 Bytes

 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
function pre_install (desc)
%{
%% Prepares for installation a package that is organized in subfolders
%% List of folders with src subfolder
subfld = {"octclip"};
%% Create correct strings
subfld_ready = strcat ({[pwd() filesep() "inst" filesep()]},
subfld,[filesep() "src" filesep() "*"]);
%% Destination folder
to_fld = strcat (pwd (),[filesep() "src"]);
%% Copy files to package/src folder
%% TODO handle merging of Makefiles
warning ("Copying subfolder src to package main dir, but multiple Makefiles are not handled")
if !exist("src","dir")
system(["mkdir " to_fld]);
end
for from_fld = subfld_ready
system (["mv " from_fld{1} " " to_fld]);
system (["rm -R " from_fld{1}(1:end-2)]);
end
%}
end