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