diff --git a/python/pip-install.sh b/python/pip-install.sh index 677cb2107..866d65c3a 100755 --- a/python/pip-install.sh +++ b/python/pip-install.sh @@ -20,9 +20,9 @@ function remove_old_backports { oldstable=$(curl -s https://deb.debian.org/debian/dists/oldstable/Release | awk '/^Codename/ {print $2}'); stable=$(curl -s https://deb.debian.org/debian/dists/stable/Release | awk '/^Codename/ {print $2}'); - matched_files="$(grep -rsil '\-backports' /etc/apt/sources.list*)" + matched_files=( $(grep -rsil '\-backports' /etc/apt/sources.list*||:) ) if [[ -n "$matched_files" ]]; then - for filename in "$matched_files"; do + for filename in "${matched_files[@]}"; do grep -e "$oldstable-backports" -e "$stable-backports" "$filename" || \ sed -i -e 's/^.*-backports.*$//' "$filename" done