Skip to content

Commit

Permalink
github action #100
Browse files Browse the repository at this point in the history
  • Loading branch information
yousefvand committed Nov 23, 2024
1 parent 15c4167 commit a3f0c7f
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 0 deletions.
1 change: 1 addition & 0 deletions .github/workflows/cmake-multi-platform.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ jobs:
choco install cmake --installargs 'ADD_CMAKE_TO_PATH=System' -y
choco install python3 -y
choco install gperf -y
choco install bison -y
choco install llvm -y
pip install html5lib
Expand Down
22 changes: 22 additions & 0 deletions assets/count_text_files.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#!/bin/bash

# Check if a path is provided
if [ -z "$1" ]; then
echo "Usage: $0 <directory-path>"
exit 1
fi

# Assign the provided path to a variable
DIR="$1"

# Check if the provided path is a valid directory
if [ ! -d "$DIR" ]; then
echo "Error: $DIR is not a valid directory."
exit 1
fi

# Find files, check MIME type, and count text files
total_text_files=$(find "$DIR" -type f -exec file --mime-type {} + | grep -c "text/")

# Output the result
echo "Total text files in '$DIR' and its subdirectories: $total_text_files"

0 comments on commit a3f0c7f

Please sign in to comment.