From 6505084525c5a0f6f551c713cfc799db74f4be90 Mon Sep 17 00:00:00 2001
From: Olivier Maury <Olivier.Maury@inrae.fr>
Date: Tue, 16 Apr 2024 10:36:16 +0200
Subject: [PATCH] Correction sloccount.sh. fixes #84

---
 bin/sloccount.sh | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/bin/sloccount.sh b/bin/sloccount.sh
index 5b15d00..02b85d5 100755
--- a/bin/sloccount.sh
+++ b/bin/sloccount.sh
@@ -21,4 +21,8 @@ fi
 echo "tokei is installed at $TOKEI"
 $TOKEI --version
 mkdir -p $ROOT_DIR/target
+if [ ! -d www-client ]; then
+	$TOKEI -f -o json $ROOT_DIR/src | $TOKEI2CLOC > $ROOT_DIR/target/cloc.xml
+	exit
+fi
 $TOKEI -f -o json $ROOT_DIR/www-client/src $ROOT_DIR/www-server/src $ROOT_DIR/www-shared/src | $TOKEI2CLOC > $ROOT_DIR/target/cloc.xml
-- 
GitLab