As it turns out, it's not the split() that does it. LpQueryDistro deliberately doesn't even return the empty pocket suffix.
Disaster strikes in this bit of shell script that I converted incorrectly:
# Combine all supported series with all pocket suffixes to build the list
# of suites for which we will generate/update Contents.gz.
new_suites=
for suite in $suites; do
new_suites="${new_suites:+$new_suites }$suite"
for pocket_suffix in $pocket_suffixes; do
if [ -d "$ARCHIVE/ubuntu/dists/$suite$pocket_suffix" ]; then
new_suites="$new_suites $suite$pocket_suffix"
fi
done
done
suites="$new_suites"
This adds the $suite to $new_suites, and then for each non-empty pocket suffix adds $suite$pocket_suffix to $new_suites.
As it turns out, it's not the split() that does it. LpQueryDistro deliberately doesn't even return the empty pocket suffix.
Disaster strikes in this bit of shell script that I converted incorrectly:
# Combine all supported series with all pocket suffixes to build the list "${new_ suites: +$new_suites }$suite" ubuntu/ dists/$ suite$pocket_ suffix" ]; then suites= "$new_suites $suite$ pocket_ suffix" "$new_suites"
# of suites for which we will generate/update Contents.gz.
new_suites=
for suite in $suites; do
new_suites=
for pocket_suffix in $pocket_suffixes; do
if [ -d "$ARCHIVE/
new_
fi
done
done
suites=
This adds the $suite to $new_suites, and then for each non-empty pocket suffix adds $suite$ pocket_ suffix to $new_suites.