aboutsummaryrefslogtreecommitdiff
path: root/target/unix/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'target/unix/main.c')
-rw-r--r--target/unix/main.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/target/unix/main.c b/target/unix/main.c
new file mode 100644
index 0000000..a2db705
--- /dev/null
+++ b/target/unix/main.c
@@ -0,0 +1,17 @@
+#include <ducky.h>
+#include <platform.h>
+
+int main(int argc, char *argv[])
+{
+ if(argc == 2)
+ {
+ int fd = open(argv[1], O_RDONLY);
+ ducky_main(fd);
+ close(fd);
+ }
+ else
+ {
+ printf("Usage: %s FILE\n", argv[0]);
+ }
+ return 0;
+}