summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAnton L. Šijanec <anton@sijanec.eu>2020-04-28 22:53:07 +0200
committerAnton L. Šijanec <anton@sijanec.eu>2020-04-28 22:53:07 +0200
commitaeef95ae52a73544681b45e387f7dd580e88e011 (patch)
treee2044669ab7835f0f6ee56db6ec9ce828a0e3979 /src
parentaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaauuu (diff)
downloadbverbose-aeef95ae52a73544681b45e387f7dd580e88e011.tar
bverbose-aeef95ae52a73544681b45e387f7dd580e88e011.tar.gz
bverbose-aeef95ae52a73544681b45e387f7dd580e88e011.tar.bz2
bverbose-aeef95ae52a73544681b45e387f7dd580e88e011.tar.lz
bverbose-aeef95ae52a73544681b45e387f7dd580e88e011.tar.xz
bverbose-aeef95ae52a73544681b45e387f7dd580e88e011.tar.zst
bverbose-aeef95ae52a73544681b45e387f7dd580e88e011.zip
Diffstat (limited to 'src')
-rw-r--r--src/jsbundle.c26
1 files changed, 26 insertions, 0 deletions
diff --git a/src/jsbundle.c b/src/jsbundle.c
new file mode 100644
index 0000000..ad98250
--- /dev/null
+++ b/src/jsbundle.c
@@ -0,0 +1,26 @@
+#include <stdlib.h>
+#include <stdio.h>
+#include <dirent.h>
+#include <string.h>
+
+int main(int argc, char* argv[]) {
+ char bundle_filename[64] = "../dist/js/bundle.js";
+ DIR *dir;
+ struct dirent *ent;
+ if ((dir = opendir ("../layout/js/")) != NULL) {
+ /* print all the files and directories within directory */
+ while ((ent = readdir (dir)) != NULL) {
+ if(strcmp(ent->d_name, ".") != 0 && strcmp(ent->d_name, "..") != 0) {
+ char *dot = strrchr(ent->d_name, '.');
+ if(dot && !strcmp(dot, ".js")) {
+ printf ("%s\n", ent->d_name);
+ }
+ }
+ }
+ closedir (dir);
+ } else {
+ /* could not open directory */
+ return 1;
+ }
+ return 0;
+}