#!/usr/bin/env sh set -ex TUI="" BASE=${BASE:-~/src/linux} PROFILE=${PROFILE:-riscv} REPO=${REPO:-riscv} VMLINUX=${VMLINUX:-$BASE/$REPO/vmlinux} while [[ $# -gt 0 ]]; do case $1 in -t | --tui) TUI="-tui" shift ;; -h | --help) SHOW_HELP=1 shift ;; -*) echo "run-gdb (error): unknown option '$1'." exit 1 ;; *) echo "run-gdb (warning): argument '$1' will be ignored." shift # past argument ;; esac done # Print the show message if needed. if [ -n "$SHOW_HELP" ]; then cat <