(no title)
codychan | 10 years ago
Hey, since you are the lead dev of the fish shell, a serious problem occurred to me weeks ago, I was compiling a QT client in fish, and there is already an environment value called `LD_LIBRARY_PATH` (including other values the compilation needs) defined in /etc/ld.so.conf.d/ and /etc/profile.d/ but fish cannot find them, if I use `set -g ...` to set it in fish shell prompt and then do the compilation, it will work, it took me a lot time to figure it out that this is the problem of fish-shell, the weird thing is, there is already one line `#!/bin/sh` at the beginning of the compilation script (it is a bash script called build.sh), so it should be executed under sh which is bash in my CentOS.
ridiculous_fish|10 years ago
bash only reads the files in /etc/profile.d when launched interactively, so those files won't be read for #!/bin/sh scripts. Of course, if you launch the script from an interactive bash session, the script will inherit the variables that the profile.d files set up.
As an aside, this zoo of configuration files is something that fish tries to avoid. fish reads its config files unconditionally, and leaves it up to the file to branch on whether the session is interactive.
TheGrassyKnoll|10 years ago
$ ls -l /bin/sh lrwxrwxrwx 1 root root 4 Feb 19 17:51 /bin/sh -> dash