summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorxyz <gky44px1999@gmail.com>2022-09-21 23:39:30 -0700
committerxyz <gky44px1999@gmail.com>2022-09-21 23:39:30 -0700
commit5fe696c97e0776b85becaa64a7e1a31ba6446792 (patch)
tree0a1e89bbd852716343571e0bc8698bd60db02e31
parent744edcd14ebcd4f58d65c359b2c8ad5697fab39f (diff)
fuck matlab
-rwxr-xr-xhome/xyz/.local/bin/matlab8
1 files changed, 7 insertions, 1 deletions
diff --git a/home/xyz/.local/bin/matlab b/home/xyz/.local/bin/matlab
index c3ee6690..906f1be8 100755
--- a/home/xyz/.local/bin/matlab
+++ b/home/xyz/.local/bin/matlab
@@ -5,7 +5,7 @@
# https://wiki.archlinux.org/title/MATLAB#Unable_to_launch_the_MATLABWindow_application
# https://faq.i3wm.org/question/2564/cant-open-matlab-from-dmenu.1.html
# https://wiki.archlinux.org/title/MATLAB#Desktop_entry
-# use /tmp as working (startup) directory and save simulink files there to avoid hard link error:
+# use /tmp as working (startup) directory and save simulink files there to avoid cross filesystem hardlink error:
# https://bbs.archlinux.org/viewtopic.php?id=277970
cmd () {
@@ -14,8 +14,14 @@ cmd () {
startup_dir=/tmp/matlab
bin_dir="$HOME/programs/MATLAB/R2022a/bin"
+addon_dir="$HOME/MATLAB Add-Ons"
[ -d "$startup_dir" ] || mkdir "$startup_dir"
+# my workaround for simulink gyroscope compile errors: "avr-gcc: error: I2Cdev.o: No such file or directory" "Code generation information file does not exist."
+# I guess it is still cross filesystem hardlink error
+# need to set path once for the "$startup_dir/$addon_dir" sub dirs
+[ -d "$startup_dir/$addon_dir" ] || cp -r "$addon_dir" "$startup_dir"
+
if ! cmd "$@"; then
"$bin_dir/activate_matlab.sh"
cmd "$@"