Line 171 install.sh error
Requirements
- [X] I have searched the issues for my issue and found nothing related or helpful
- [X] I have searched the FAQ for help
- [X] I have checked the Wiki for help
Experienced Behavior
I got this error on my mac:
Nerd Fonts installer -- Version 0.7
install.sh: line 171: syntax error near unexpected token `<'
install.sh: line 171: `done < <(eval "$find_command")'
Expected Behavior
I expected it to work just fine with no errors
Example Symbols or Text
No response
Font Used
3270
Source of Font File
I used github and then cloned it I was following this tutorial: https://docs.rockylinux.org/books/nvchad/nerd_fonts/
Terminal Emulator (and the title of the terminal window)
kitty
Operating System and Version
macOS Sonoma 14.1.2
Screenshots
No response
Did you install a not-ancient bash (via Homebrew for example)?
On Mac I would recommend using Homebrew to install the fonts via brew, and / or at least have a decent version of bash.
I can have a look later, but usually bash 3 is not supported; maybe we should refuse to execute on that?
brew install font-3270-nerd-font or similar ;)
Same with the test-fonts script. Maybe at least add a check for the bash version and/or how to install a recent bash under MacOS.
- #1735
I tried to rewrite one script that uses native arrays for bash 3 (which Apple deems modern enough), but that is really really hard to do right. There is a reason why arrays had been introduced, and handling file names with blanks without that feature renders the code rather unreadable. The maintenance burden would be much higher with bash 3 code; so I believe we should stick to bash 4 scripts or rewrite them in Python.
In principle we could add a warning if the bash version is too old, but on the other hand, hey Apple, bash 4 came out in 2009, you must be kidding to have bash 3 still in your current MacOS!
I really tried rewriting, like put 8 hours in the rewrite, but I believe now we should not use bash 3...
Later comment:
We could only rewrite as Python or zsh, but both are completely different and would need extended testing which takes time besides the pure rewrite time... Too much time probably.
Let me know if the readme solution is good enough, or if you think there should be explicit checks in each script to protect people who do not read readmes ;)
https://dev.to/bphogan/use-modern-bash-shell-on-macos-22a6
Edit: Add link Edit: Add "later comment"
@DCMill
I worked on the install.sh script a lot, and it uses only Bash 3 features now.
But the issue you encountered
install.sh: line 171: syntax error near unexpected token `<'
install.sh: line 171: `done < <(eval "$find_command")'
is still approximately there still.
I tested the new install.sh on Sequoia 15.4.1 and it works.
Maybe you can test it again. Needed script version is 1.0.0.
- #1866
This issue has been automatically locked since there has not been any recent activity (i.e. last half year) after it was closed. It helps our maintainers focus on the active issues. If you have found a problem that seems similar, please open a new issue, complete the issue template with all the details necessary to reproduce, and mention this issue as reference.