summaryrefslogtreecommitdiff
path: root/third/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'third/scripts')
-rw-r--r--third/scripts/README2
-rw-r--r--third/scripts/meson.build3
-rw-r--r--third/scripts/mkboot.c27
3 files changed, 32 insertions, 0 deletions
diff --git a/third/scripts/README b/third/scripts/README
new file mode 100644
index 0000000..301b8cd
--- /dev/null
+++ b/third/scripts/README
@@ -0,0 +1,2 @@
+The [scripts] module provides small cross platform scripts to assist
+in the building of the \ No newline at end of file
diff --git a/third/scripts/meson.build b/third/scripts/meson.build
new file mode 100644
index 0000000..e286242
--- /dev/null
+++ b/third/scripts/meson.build
@@ -0,0 +1,3 @@
+project('scripts', 'c')
+
+mkboot = executable('mkboot', 'mkboot.c', native: true) \ No newline at end of file
diff --git a/third/scripts/mkboot.c b/third/scripts/mkboot.c
new file mode 100644
index 0000000..864cb5e
--- /dev/null
+++ b/third/scripts/mkboot.c
@@ -0,0 +1,27 @@
+#include <stdio.h>
+#include <string.h>
+#include <stdlib.h>
+
+#ifdef _WIN64
+#include <process.h>
+#endif
+
+int main(int argc, char **argv) {
+ if (argc < 4)
+ return 1;
+
+ char cmd[4097];
+
+ sprintf(cmd, "%s %s format ::%s", argv[1], argv[2], argv[3]);
+ system(cmd);
+
+ sprintf(cmd, "%s %s mkdir /boot", argv[1], argv[2]);
+ system(cmd);
+
+ for (int i = 4; i < argc; i += 2) {
+ sprintf(cmd, "%s %s cp ::%s /boot/%s", argv[1], argv[2], argv[i], argv[i + 1]);
+ system(cmd);
+ }
+
+ return 0;
+} \ No newline at end of file