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 "$@"