From ee8e8607896b701f056dbc39a83187d8d22f930d Mon Sep 17 00:00:00 2001 From: Benedikt Peetz Date: Sun, 19 May 2024 14:06:04 +0200 Subject: [PATCH] build(update.sh): Don't always perform the expensive `upgrade` --- update.sh | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/update.sh b/update.sh index 8e07ddb..4019ff9 100755 --- a/update.sh +++ b/update.sh @@ -19,9 +19,14 @@ # and the Lesser GNU General Public License along with this program. # If not, see . -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 "$@"