فهرست منبع

[Arch] Add postbuild script

xcbosa mbp16 5 ماه پیش
والد
کامیت
cec0981700
2فایلهای تغییر یافته به همراه14 افزوده شده و 2 حذف شده
  1. 10 0
      .vscode/settings.json
  2. 4 2
      postbuild.sh

+ 10 - 0
.vscode/settings.json

@@ -0,0 +1,10 @@
+{
+    "files.associations": {
+        "cstdio": "cpp",
+        "locale": "cpp",
+        "stat.h": "c",
+        "pthread.h": "c",
+        "stdbool.h": "c",
+        "ioctl.h": "c"
+    }
+}

+ 4 - 2
postbuild.sh

@@ -11,9 +11,11 @@ GCC="output/host/bin/riscv64-buildroot-linux-gnu-gcc"
 for file in `ls post_sbin`
     do
         filePath="post_sbin/"$file
-        if [ -f $filePath ]
-        then
+        if [ -f $filePath ]; then
             gccout="output/images/rootfs"${file%".c"}
+            if [ -f $gccout ]; then
+                rm $gccout
+            fi
             $GCC $filePath -o $gccout -O2
         fi
     done