Fix typo: the variable is called $repos, not $repo. This disallowed
upgrading single packages.
Also remove a lone -o in an if command.