From 000034a74bd306535c4c4ca715587c08142c6b55 Mon Sep 17 00:00:00 2001
From: guowenxue <guowenxue@gmail.com>
Date: Fri, 12 Jun 2026 17:53:48 +0800
Subject: [PATCH] Add top build shell script

---
 libevdev/build.sh |   13 ++++++++-----
 1 files changed, 8 insertions(+), 5 deletions(-)

diff --git a/libevdev/build.sh b/libevdev/build.sh
index a4ff82a..6f0a570 100755
--- a/libevdev/build.sh
+++ b/libevdev/build.sh
@@ -30,6 +30,9 @@
 # download taballs path
 TARBALL_PATH=$PRJ_PATH/tarballs
 
+# check installed or not file
+INST_FILE=$PREFIX_PATH/lib/libevdev.so
+
 # shell script will exit once get command error
 set -e
 
@@ -64,6 +67,11 @@
 
 function do_fetch()
 {
+    if [ -e ${INST_FILE} ] ; then
+        pr_warn "$LIB_NAME compiled already, exit..."
+        exit;
+    fi
+
     if [ -d $LIB_NAME ] ; then
         pr_warn "$LIB_NAME source code fetched already"
         return 0;
@@ -119,11 +127,6 @@
     exit;
 fi
 
-if [ -e $PREFIX_PATH/lib/libevdev.so ] ; then
-    pr_warn "$LIB_NAME compiled already, exit..."
-    exit;
-fi
-
 do_fetch
 
 do_export

--
Gitblit v1.10.0