summaryrefslogtreecommitdiff
path: root/utils/update-mojo.sh
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2024-01-04 17:15:43 +0200
committerKieran Bingham <kieran.bingham@ideasonboard.com>2024-01-09 15:39:04 +0000
commit0e9585ff5bb1da9132be625874c16839debb1ab5 (patch)
tree58bc0c4ab931c389de202dce7490d8f18c496227 /utils/update-mojo.sh
parent09af551b93628dbc644cbc2f5bd12c8073c4b668 (diff)
utils: update-mojo.sh: Change to the libcamera source directory
Instead of prefixing all paths to IPC files with ${ipc_dir}, change to the libcamera sources root directory and use relative file paths. This simplifies the update script. 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-xutils/update-mojo.sh20
1 files changed, 11 insertions, 9 deletions
diff --git a/utils/update-mojo.sh b/utils/update-mojo.sh
index 831f5ab8..b6fbc6d1 100755
--- a/utils/update-mojo.sh
+++ b/utils/update-mojo.sh
@@ -11,7 +11,9 @@ if [ $# != 1 ] ; then
fi
ipc_dir="$(dirname "$(realpath "$0")")/ipc"
-chromium_dir="$1"
+chromium_dir="$(realpath "$1")"
+
+cd "${ipc_dir}/../../"
if [ ! -d "${chromium_dir}/mojo" ] ; then
echo "Directory ${chromium_dir} doesn't contain mojo"
@@ -33,16 +35,16 @@ if [ -n "$(git -C "${chromium_dir}" status --porcelain)" ] ; then
fi
# Remove the previously imported files.
-rm -rf "${ipc_dir}/mojo/"
-rm -rf "${ipc_dir}/tools/"
+rm -rf utils/ipc/mojo/
+rm -rf utils/ipc/tools/
# Copy the diagnosis file
-mkdir -p "${ipc_dir}/tools/diagnosis"
-cp "${chromium_dir}/tools/diagnosis/crbug_1001171.py" "${ipc_dir}/tools/diagnosis"
+mkdir -p utils/ipc/tools/diagnosis/
+cp "${chromium_dir}/tools/diagnosis/crbug_1001171.py" utils/ipc/tools/diagnosis/
# Copy the rest of mojo
-mkdir -p "${ipc_dir}/mojo/public"
-cp "${chromium_dir}/mojo/public/LICENSE" "${ipc_dir}/mojo/public"
+mkdir -p utils/ipc/mojo/public/
+cp "${chromium_dir}/mojo/public/LICENSE" utils/ipc/mojo/public/
(
cd "${chromium_dir}" || exit
@@ -61,8 +63,8 @@ modify them manually.
EOF
)
-echo "$readme" > "${ipc_dir}/mojo/README"
-echo "$readme" > "${ipc_dir}/tools/README"
+echo "$readme" > utils/ipc/mojo/README
+echo "$readme" > utils/ipc/tools/README
cat <<EOF
------------------------------------------------------------