Automated update
This commit is contained in:
@@ -39,26 +39,18 @@ check_wifi() {
|
||||
get_repo_dirs() {
|
||||
local valid_dirs=()
|
||||
|
||||
echo "Reading directories from $TXT_FILE..." # Debugging line
|
||||
|
||||
while IFS= read -r repo_dir; do
|
||||
# Trim whitespace and skip empty lines
|
||||
repo_dir=$(echo "$repo_dir" | xargs)
|
||||
[ -z "$repo_dir" ] && continue
|
||||
|
||||
echo "Processing: '$repo_dir'" # Debugging line to show each line being processed
|
||||
|
||||
# Check if the directory is valid and contains a .git folder
|
||||
if [ -d "$repo_dir" ] && [ -d "$repo_dir/.git" ]; then
|
||||
echo "Valid Git repository found: '$repo_dir'" # Debugging line
|
||||
valid_dirs+=("$repo_dir")
|
||||
else
|
||||
echo "Invalid directory or not a Git repository: '$repo_dir'" # Debugging line
|
||||
fi
|
||||
done < "$TXT_FILE"
|
||||
|
||||
# Ensure the valid_dirs array contains the expected directories
|
||||
echo "Valid directories: ${valid_dirs[@]}" # Final debug line showing valid directories
|
||||
# Output only the valid directories without any additional text
|
||||
echo "${valid_dirs[@]}"
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user