diff options
author | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2024-01-04 17:15:44 +0200 |
---|---|---|
committer | Kieran Bingham <kieran.bingham@ideasonboard.com> | 2024-01-09 15:39:04 +0000 |
commit | a9adb798e1daed8eaf33ae7a31f81ff74d4193ca (patch) | |
tree | 5f3ef972b1e1dd27a6651f5936c139ea0ee9cba6 /utils/update-mojo.sh | |
parent | 0e9585ff5bb1da9132be625874c16839debb1ab5 (diff) |
utils: update-mojo.sh: Reject a dirty libcamera tree
If the libcamera tree is dirty committing the result of the mojo update
will be messy. Bail out in that case.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Milan Zamazal <mzamazal@redhat.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Diffstat (limited to 'utils/update-mojo.sh')
-rwxr-xr-x | utils/update-mojo.sh | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/utils/update-mojo.sh b/utils/update-mojo.sh index b6fbc6d1..25a280e0 100755 --- a/utils/update-mojo.sh +++ b/utils/update-mojo.sh @@ -15,6 +15,12 @@ chromium_dir="$(realpath "$1")" cd "${ipc_dir}/../../" +# Reject dirty libcamera trees +if [ -n "$(git status --porcelain -uno)" ] ; then + echo "libcamera tree is dirty" + exit 1 +fi + if [ ! -d "${chromium_dir}/mojo" ] ; then echo "Directory ${chromium_dir} doesn't contain mojo" exit 1 @@ -28,7 +34,7 @@ fi # Get the chromium commit id version=$(git -C "${chromium_dir}" rev-parse --short HEAD) -# Reject dirty trees +# Reject dirty chromium trees if [ -n "$(git -C "${chromium_dir}" status --porcelain)" ] ; then echo "Chromium tree in ${chromium_dir} is dirty" exit 1 |