Mentions légales du service
Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
faust
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
faust group
faust
Commits
1ea25ea1
Commit
1ea25ea1
authored
7 years ago
by
hhakim
Browse files
Options
Downloads
Patches
Plain Diff
Avoid to exit in matlab postinstall script.
It could block another postinstall script to be executed after.
parent
70f0ac5a
Branches
Branches containing commit
Tags
2.2-rc3
Tags containing commit
No related merge requests found
Pipeline
#833823
skipped
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
misc/binpkg_postinst_scripts/debrpm/postinst_matlab.sh.in
+10
-7
10 additions, 7 deletions
misc/binpkg_postinst_scripts/debrpm/postinst_matlab.sh.in
misc/binpkg_postinst_scripts/macosx/postinst_matlab.sh.in
+10
-7
10 additions, 7 deletions
misc/binpkg_postinst_scripts/macosx/postinst_matlab.sh.in
with
20 additions
and
14 deletions
misc/binpkg_postinst_scripts/debrpm/postinst_matlab.sh.in
+
10
−
7
View file @
1ea25ea1
...
...
@@ -8,10 +8,13 @@ function dirname_noerr {
MATLAB_ROOT
=
$(
dirname_noerr
$(
dirname_noerr
$(
which matlab 2>/dev/null
)))
[[
!
-d
"
${
MATLAB_ROOT
}
"
]]
&&
MATLAB_ROOT
=
$(
dirname_noerr
$(
dirname_noerr
$(
find /usr/local
-maxdepth
10
-type
f
-name
"matlab"
|
tail
-n
1
)))
[[
!
-d
"
${
MATLAB_ROOT
}
"
]]
&&
MATLAB_ROOT
=
$(
dirname_noerr
$(
dirname_noerr
$(
find /opt/
-maxdepth
10
-type
f
-name
"matlab"
|
tail
-n
1
)))
[[
!
"
$?
"
=
0
||
!
-d
"
${
MATLAB_ROOT
}
"
]]
&&
echo
"Can't find Matlab root dir. Add MATLAB_ROOT/bin to the PATH environment variable (of root user)."
>
&2
&&
exit
1
STARTUP_DIR
=
"
${
MATLAB_ROOT
}
/toolbox/local/"
STARTUP_FILE
=
${
STARTUP_DIR
}
/startup.m
[[
-r
"
$STARTUP_FILE
"
]]
&&
grep
-i
-v
faust
"
$STARTUP_FILE
"
>
"
$STARTUP_FILE
"
FAUST_MATLAB_WRAPPER_PATH
=
"@CMAKE_INSTALL_MATLAB_PREFIX@"
echo
"addpath(genpath('"
$FAUST_MATLAB_WRAPPER_PATH
"'))"
>>
"
$STARTUP_FILE
"
if
[[
!
"
$?
"
=
0
||
!
-d
"
${
MATLAB_ROOT
}
"
]]
then
echo
"Can't find Matlab root dir. Add MATLAB_ROOT/bin to the PATH environment variable (of root user)."
>
&2
else
STARTUP_DIR
=
"
${
MATLAB_ROOT
}
/toolbox/local/"
STARTUP_FILE
=
${
STARTUP_DIR
}
/startup.m
[[
-r
"
$STARTUP_FILE
"
]]
&&
grep
-i
-v
faust
"
$STARTUP_FILE
"
>
"
$STARTUP_FILE
"
FAUST_MATLAB_WRAPPER_PATH
=
"@CMAKE_INSTALL_MATLAB_PREFIX@"
echo
"addpath(genpath('"
$FAUST_MATLAB_WRAPPER_PATH
"'))"
>>
"
$STARTUP_FILE
"
fi
This diff is collapsed.
Click to expand it.
misc/binpkg_postinst_scripts/macosx/postinst_matlab.sh.in
+
10
−
7
View file @
1ea25ea1
#!/bin/bash
MATLAB_ROOT
=
$(
find /Applications/
-iname
"MATLAB*"
-maxdepth
1 |
tail
-n
1
)
[[
!
"
$?
"
=
0
||
!
-d
"
${
MATLAB_ROOT
}
"
]]
&&
echo
"Can't find Matlab root dir. Add MATLAB_ROOT/bin to the PATH environment variable (of admin. user)."
>
&2
&&
exit
1
STARTUP_DIR
=
"
${
MATLAB_ROOT
}
/toolbox/local/"
STARTUP_FILE
=
${
STARTUP_DIR
}
/startup.m
[[
-r
"
$STARTUP_FILE
"
]]
&&
grep
-i
-v
faust
"
$STARTUP_FILE
"
>
"
$STARTUP_FILE
"
FAUST_MATLAB_WRAPPER_PATH
=
"@CMAKE_INSTALL_MATLAB_PREFIX@"
echo
"addpath(genpath('"
$FAUST_MATLAB_WRAPPER_PATH
"'))"
>>
$STARTUP_FILE
if
[[
!
"
$?
"
=
0
||
!
-d
"
${
MATLAB_ROOT
}
"
]]
then
echo
"Can't find Matlab root dir. Add MATLAB_ROOT/bin to the PATH environment variable (of admin. user)."
>
&2
else
STARTUP_DIR
=
"
${
MATLAB_ROOT
}
/toolbox/local/"
STARTUP_FILE
=
${
STARTUP_DIR
}
/startup.m
[[
-r
"
$STARTUP_FILE
"
]]
&&
grep
-i
-v
faust
"
$STARTUP_FILE
"
>
"
$STARTUP_FILE
"
FAUST_MATLAB_WRAPPER_PATH
=
"@CMAKE_INSTALL_MATLAB_PREFIX@"
echo
"addpath(genpath('"
$FAUST_MATLAB_WRAPPER_PATH
"'))"
>>
$STARTUP_FILE
fi
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment