summaryrefslogtreecommitdiff
path: root/navi
blob: 867f0bfe377e2a512e11c96ca2a5cf82a3e2b474 (plain)
  1. #!/bin/bash
  2. x=''
  3. help=''
  4. args=''
  5. argc=0
  6. while [ $# -gt 0 ]; do
  7. case $1 in
  8. --x|-x) x='1';;
  9. --help|-h) help='1';;
  10. *) args="$args $1"; argc=$(($argc+1));;
  11. esac
  12. shift
  13. done
  14. set -- $args
  15. usage () {
  16. echo "Usage: $(basename $0) [-x] [{target}]"
  17. }
  18. if [ -n "$1" ]; then
  19. target=$1
  20. shift
  21. fi
  22. [ $# -gt 0 ] && help='1'
  23. if [ $help ]; then
  24. usage
  25. exit 1
  26. fi
  27. if [ ! -e ~/$target/.dosemurc ]; then
  28. echo "Wrong target!"
  29. exit 1
  30. fi
  31. if [ -n "$x" ]; then
  32. prg=/usr/bin/xdos
  33. [ -x $prg ] || prg=/usr/bin/xdosemu
  34. else
  35. prg=/usr/bin/dos
  36. [ -x $prg ] || prg=/usr/bin/dosemu.bin
  37. fi
  38. $prg -f ~/$target/.dosemurc