editors/dumpbuiltin.sh: make a little more user-friendly

If no $NASM is defined and no nasm path has been given on the command
line, default to "../nasm".

Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
This commit is contained in:
H. Peter Anvin (Intel) 2026-06-26 14:35:07 -07:00
parent 3f269f2dc8
commit 139986238a

View file

@ -10,9 +10,8 @@
tmp="$(mktemp -d)"
[ -n "$tmp" ] || exit 1
if [ -n "$1" ]; then
NASM="$1"
fi
NASM="${NASM:-../nasm}"
NASM="${1:-$NASM}"
: > "$tmp/junk.asm"
"$NASM" -f bin -o "$tmp/junk.bin" -Lsb -l "$tmp/junk.lst" "$tmp/junk.asm"