diff --git a/pull b/pull index fa8fa1a..c4db57d 100755 --- a/pull +++ b/pull @@ -13,8 +13,8 @@ while IFS= read -r repo_path || [[ -n "$repo_path" ]]; do # Trim whitespace repo_path=$(echo "$repo_path" | xargs) - # Skip empty lines - [ -z "$repo_path" ] && continue + # Skip empty lines and lines starting with # + [[ -z "$repo_path" || "$repo_path" == \#* ]] && continue echo "Processing repository: $repo_path" diff --git a/up b/up index 329a919..f31af97 100755 --- a/up +++ b/up @@ -1,7 +1,7 @@ #!/bin/bash # Path to the file containing the list of repositories -REPOS_FILE=~/workshop/repos.txt +REPOS_FILE=~/myrepos.txt # Check if the repos file exists if [ ! -f "$REPOS_FILE" ]; then @@ -14,8 +14,8 @@ while IFS= read -r repo_path || [[ -n "$repo_path" ]]; do # Trim whitespace repo_path=$(echo "$repo_path" | xargs) - # Skip empty lines - [ -z "$repo_path" ] && continue + # Skip empty lines and lines starting with # + [[ -z "$repo_path" || "$repo_path" == \#* ]] && continue # Expand tilde to home directory repo_path="${repo_path/#\~/$HOME}"