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