summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuca Barbieri <luca@luca-barbieri.com>2010-03-29 06:09:24 +0200
committerLuca Barbieri <luca@luca-barbieri.com>2010-03-29 06:09:24 +0200
commit4b9f85c453bfabe109ceb430cf662b5f31f58b2c (patch)
tree4b727bf6f7ad6b7ea42eb29317476d306ed4a468
parent938defafe2da5a787b63f64023bef5d54e097424 (diff)
.
-rwxr-xr-xnvexec4
1 files changed, 2 insertions, 2 deletions
diff --git a/nvexec b/nvexec
index 3216740..0b6d0fe 100755
--- a/nvexec
+++ b/nvexec
@@ -1,5 +1,5 @@
#!/bin/bash
-sed -re 's/(\S+)\s*:\s*(\S+)/\1 \1_\2/; s/^\s*(\S+)\s+(\S+)\s*=\s*(\S+)\s*$/printf("%u %u %u\\n", \1, \2, \3);/; 1s@^@#include <nouveau/nouveau_class.h>\n#include <stdio.h>\nint main(int argc, char** argv) {\n@; $ s/$/\nreturn 0;\n}/; ' "$@" > temp.c
-rm -f && gcc -o temp temp.c && ./temp > input.txt
+sed -re 's/(\S+)\s*:\s*(\S+)/\1 \1_\2/; s/^\s*(\S+)\s+(\S+)\s*=(.*)$/printf("%u %u %u\\n", \1, \2, \3);/; 1s@^@#include <nouveau/nouveau_class.h>\n#include <stdio.h>\nint main(int argc, char** argv) {\n@; $ s/$/\nreturn 0;\n}/; ' "$@" > temp.c
+gcc -o temp temp.c && ./temp > input.txt
sync
./nvexec_raw < input.txt