From 23ec51cec2cb0576e67c24b274f31081caecaba2 Mon Sep 17 00:00:00 2001 From: Soispha <soispha@vhack.eu> Date: Tue, 7 Nov 2023 20:46:18 +0100 Subject: [PATCH] build(update.sh): Make adding subcrates easier --- update.sh | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/update.sh b/update.sh index 3f58c76..307d47f 100755 --- a/update.sh +++ b/update.sh @@ -1,13 +1,19 @@ -#!/usr/bin/env bash +#!/usr/bin/env sh + +update() { + cd "$1" || (echo "No '$1' directory" && exit 1) + + cargo update && cargo upgrade + + [ "$1" = "." ] || cd .. +} + +update . +update ./language_macros +update ./keymaps -cargo update && cargo upgrade -cd ./language_macros || (echo "No language_macros directory" && exit 1) - -cargo update && cargo upgrade - -cd .. git add Cargo.lock Cargo.toml flake.lock ./language_macros/Cargo.toml # vim: ft=sh