dnschneid/crouton — pull request #234 by drinkcat (2013-06-22 14:11:04+00:00)
Title: Do not update mirror unless explicitely specificied on command line.

crouton keeps overriding the mirror setting during updates (this is especially annoying when you live far away from the US: the speed difference can be up to 20 times...). This branch fixes it by only updating it if `-m` is specified on the command line (`-m ''` will reset to the default mirror).

- Relies on the fact `/etc/apt/sources.list` is empty after bootstrapping (tested on `precise` only)
- Add an extra variable to `prepare.sh` (`MIRRORSET`), to tell if `MIRROR` has been set explicitely, or if it is a default value. I considered other approaches (e.g. having a `DEFAULTMIRROR` variable), but I think this is cleaner.
- Add an extra `#` at the end of string substitutions in `prepare.sh` (since `#MIRROR` is a prefix of `#MIRRORSET`, this leads to some "interesting" behaviour otherwise)...