project-everest / everest

https://project-everest.github.io/
Apache License 2.0
193 stars 29 forks source link

./everest pull: Call new version of ./everest after self-updating #22

Closed tahina-pro closed 7 years ago

tahina-pro commented 7 years ago

./everest pull, after self-update, used to not update the working copies of each component of everest, printing the usage message instead. Then, I thought to have "fixed" this bug by commit d5023e2d56702140fd69c77df32372f1d9bfcbfa. Alas, due to this so-called "fix", everest actually lost the ability to run the new version of itself after self-updating.

In fact, the bug was due to the following: in a function such as self_update, $@ contains the list of arguments to the function, not to the overall script.

This is why, this pull request aims to restore the ability for everest to run the new version of itself after self-updating, by first saving the script's remaining arguments, as well as options such as --yes, to separate options and remaining_args arrays before entering the self_update function.