This question is somewhat trickier than it sounds. I have installed the ardinuo IDE under /usr/local (not really the "normal" place -- most people would install it under $HOME). I then created symlinks to the two executables, ardinuo and (important to my case at hand) ardinuo-builder in /usr/local/bin. I made these relative links (../ardinuo-x.y.z/). I happen to have slightly different versions of the ardinuo IDE on different machines on my LAN, but I want to have a single build script (build.sh) that will run anywhere (and since I have the project up as a public project on GitHub, possibly on other people's machines). The ardinuo-builder needs to be passed the exact install directory of the ardinuo IDE, in order for it to find stuff it needs. I know how to deal with this with Tcl, but although I do have Tcl install on all of my machines, I would not expect that to be true of other people. I would like to get this done in bash, but I am not finding an obvious standard tool in /bin or /usr/bin that will do what I want. Any suggestions?
Asked
Active
Viewed 28 times
0
-
Does the `readlink` answer at https://stackoverflow.com/questions/16017500/how-to-see-full-absolute-path-of-a-symlink help? – EdmCoff Jul 04 '22 at 21:22
-
How would you do it in tcl? – Shawn Jul 04 '22 at 23:00
-
EdmCoff: yes readlink solves my problem. thanks. – Robert Heller Jul 05 '22 at 13:53
-
Shawn: Stackexchange won't let me post the Tcl code. – Robert Heller Jul 05 '22 at 13:54