Skip to content

Commit 8d4f424

Browse files
author
kan
committed
camel to snake
1 parent 03d6e41 commit 8d4f424

File tree

1 file changed

+31
-25
lines changed

1 file changed

+31
-25
lines changed

functions/package/mlappkit_static_bundle_creator.m

Lines changed: 31 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,15 @@ function mlappkit_static_bundle_creator()
88
%
99

1010
%% path intel
11-
conf.current_dir = pwd();
12-
conf.slashesPos = regexp(conf.current_dir, filesep());
13-
conf.projectFolder = conf.current_dir(conf.slashesPos(end)+1 : end);
14-
conf.folderPath = conf.current_dir(1 : conf.slashesPos(end)-1);
15-
conf.fullProjectPath = conf.current_dir;
11+
conf.current_dir = pwd();
12+
conf.slashesPos = regexp(conf.current_dir, filesep());
13+
conf.project_folder = conf.current_dir(conf.slashesPos(end)+1 : end);
14+
conf.folder_path = conf.current_dir(1 : conf.slashesPos(end)-1);
15+
conf.full_project_path = conf.current_dir;
1616

17-
conf.projectName = [conf.projectFolder, '_static_bundle'];
18-
conf.path_to_project = fullfile(userpath(), conf.projectName);
19-
conf.complete_path = fullfile(conf.path_to_project, conf.projectName) ;
17+
conf.project_name = [conf.project_folder, '_static_bundle'];
18+
conf.path_to_project = fullfile(userpath(), conf.project_name);
19+
conf.complete_path = fullfile(conf.path_to_project, conf.project_name);
2020

2121
%% create minmal folder structure
2222
mkdir(conf.complete_path)
@@ -35,15 +35,16 @@ function mlappkit_static_bundle_creator()
3535
s = s(2:end);
3636

3737
for i = 1:numel (s)
38-
[~, ~, ~] = copyfile(s{i},...
39-
fullfile(conf.complete_path, 'functions', 'building'),...
40-
'f') ;
38+
[~, ~, ~] = copyfile(...
39+
s{i},...
40+
fullfile(conf.complete_path, 'functions', 'building'),...
41+
'f') ;
4142
end
4243

4344
clear m i s
4445

4546
%% copy packaging functions [ ii ]
46-
m = dir (fullfile(conf.current_dir, 'functions', 'package', '*.m'));
47+
m = dir(fullfile(conf.current_dir, 'functions', 'package', '*.m'));
4748

4849
s = cell(1, 1);
4950
for i = 1 : numel(m)
@@ -52,25 +53,28 @@ function mlappkit_static_bundle_creator()
5253
s = s(2:end);
5354

5455
for i = 1 : numel(s)
55-
[~ , ~, ~] = copyfile(s{i},...
56-
fullfile(conf.complete_path , 'functions', 'package'),...
57-
'f');
56+
[~ , ~, ~] = copyfile(...
57+
s{i},...
58+
fullfile(conf.complete_path , 'functions', 'package'),...
59+
'f');
5860
end
5961
clear m i s
6062

6163
%% copy the quickstart function [ iii ]
62-
[~ , ~, ~] = copyfile(fullfile(conf.current_dir, 'functions', 'setup', 'mlappkit_quickstart.m'),...
63-
fullfile(conf.complete_path, 'functions', 'setup'),...
64-
'f');
64+
[~ , ~, ~] = copyfile(...
65+
fullfile(conf.current_dir, 'functions', 'setup', 'mlappkit_quickstart.m'),...
66+
fullfile(conf.complete_path, 'functions', 'setup'),...
67+
'f');
6568

6669
%% copy the quickstart template [ iv ]
6770
if exist(fullfile(conf.current_dir, 'functions', 'templates', 'mlappkit_qst.zip'), 'file') ~= 2
6871
error('run the generic bundle packager first')
6972
end
7073

71-
[~ , ~, ~] = copyfile(fullfile(conf.current_dir, 'functions', 'templates', 'mlappkit_qst.zip'),...
72-
fullfile(conf.complete_path, 'functions', 'templates' ),...
73-
'f');
74+
[~ , ~, ~] = copyfile(...
75+
fullfile(conf.current_dir, 'functions', 'templates', 'mlappkit_qst.zip'),...
76+
fullfile(conf.complete_path, 'functions', 'templates' ),...
77+
'f');
7478

7579
%% zip it [ v ]
7680
if exist(fullfile(conf.current_dir, 'functions', 'templates'),'dir') ~= 7
@@ -80,13 +84,15 @@ function mlappkit_static_bundle_creator()
8084
zip(conf.complete_path, conf.complete_path);
8185

8286
%% copy the setupfile into the toplevel [ vi ]
83-
[~, ~, ~] = copyfile(fullfile(conf.current_dir, 'functions', 'setup', 'mlappkit_setup.m'),...
84-
fullfile(conf.path_to_project),...
85-
'f');
87+
[~, ~, ~] = copyfile(...
88+
fullfile(conf.current_dir, 'functions', 'setup', 'mlappkit_setup.m'),...
89+
fullfile(conf.path_to_project),...
90+
'f');
8691
rmdir(conf.complete_path, 's');
8792

8893
%% copy the package into the templates directory [ vii ]
89-
zip(fullfile(conf.current_dir, 'functions', 'templates', [conf.projectName, '.zip']),...
94+
zip(...
95+
fullfile(conf.current_dir, 'functions', 'templates', [conf.project_name, '.zip']),...
9096
conf.path_to_project);
9197

9298
%% delete temporary files and folders [ vii ]

0 commit comments

Comments
 (0)