Advertisement
tobast

Untitled

Jan 15th, 2016
116
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.34 KB | None | 0 0
  1. #!/bin/bash
  2.  
  3. debug=""
  4. if [ $1 = "-g" ] ; then
  5. debug="-g -O0 "
  6. shift
  7. fi
  8.  
  9. ./pscala -o "/tmp/pscala_tmp.s" "$1" && \
  10. gcc $debug -o "/tmp/pscala_tmp" "/tmp/pscala_tmp.s" && \
  11. (if [ "$debug" = "" ] ; then /tmp/pscala_tmp ; fi)
  12.  
  13. out=$?
  14. if (( $out > 0 )); then exit $out; fi
  15.  
  16. if [ "$debug" != "" ]; then
  17. gdb /tmp/pscala_tmp
  18. fi
  19.  
  20. rm -f /tmp/pscala_tmp{.s,}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement