build(update.sh): Don't always perform the expensive `upgrade`
This commit is contained in:
parent
c6dc9db2e8
commit
ee8e860789
|
@ -19,9 +19,14 @@
|
|||
# and the Lesser GNU General Public License along with this program.
|
||||
# If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
cargo update && cargo upgrade
|
||||
update() {
|
||||
[ "$1" = "upgrade" ] && cargo upgrade
|
||||
cargo update
|
||||
}
|
||||
|
||||
update "$@"
|
||||
cd ./example/main || {
|
||||
echo "Main example is missing"
|
||||
exit 1
|
||||
}
|
||||
cargo update && cargo upgrade
|
||||
update "$@"
|
||||
|
|
Reference in New Issue