#!/bin/sh make -s || exit cd build if [ "$1" = "d" ]; then qemu-riscv64 -g 1234 main & riscv64-linux-gnu-gdb -q \ -ex "target remote :1234" \ main else qemu-riscv64 main fi