Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove path from nasm references #12

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Remove path from nasm references #12

wants to merge 1 commit into from

Conversation

tyilo
Copy link
Contributor

@tyilo tyilo commented Jul 8, 2013

Mac OS X seems to come with nasm in /usr/bin and I also have nasm from MacPorts in /opt/local/bin.

I don't know why you both reference nasm in both /usr/bin and /usr/local/bin, but it should now work with any path.

Mac OS X seems to come with nasm in `/usr/bin` and I also have nasm from MacPorts in `/opt/local/bin`.

I why you both reference `nasm` in both `/usr/bin` and `/usr/local/bin`, but it should work now with any path.
@gdbinit
Copy link
Owner

gdbinit commented Jul 8, 2013

OS X default nasm does not assemble 64 bits.
The /usr/local/bin path is the default for compiling latest NASM from the source since I don't use MacPorts. Not sure if path to nasm can be added as a configurable option.

@tyilo
Copy link
Contributor Author

tyilo commented Jul 8, 2013

You're right.

Could you use something like this to determine the latest version of nasm installed:

shell type -aP nasm | while read line; do echo $("$line" -v | cut -f 3 -d ' ') "$line"; done | sort -t '.' -g | tail -1 | cut -f 2 -d ' '

@tyilo
Copy link
Contributor Author

tyilo commented Jul 8, 2013

Or you could just use

shell nasms=("/usr/local/bin" "/opt/local/bin" "/usr/bin"); for i in ${nasms[@]}; do if [[ -f "$i/nasm" ]]; then echo "$i/nasm"; break; fi; done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants