From ff79e60dd0fe82e119fae5789c4ca08cbe90ee94 Mon Sep 17 00:00:00 2001 From: Vito Gamberini Date: Fri, 19 Jul 2024 12:13:17 -0400 Subject: [PATCH] PkgC: Add update-llpkgc script --- Utilities/Scripts/update-llpkgc.bash | 34 ++++++++++++++++++++++++++++ Utilities/cmllpkgc/README.rst | 14 ++++++++++++ 2 files changed, 48 insertions(+) create mode 100755 Utilities/Scripts/update-llpkgc.bash create mode 100644 Utilities/cmllpkgc/README.rst diff --git a/Utilities/Scripts/update-llpkgc.bash b/Utilities/Scripts/update-llpkgc.bash new file mode 100755 index 0000000000..b1dd017032 --- /dev/null +++ b/Utilities/Scripts/update-llpkgc.bash @@ -0,0 +1,34 @@ +#!/usr/bin/env bash + +# Note: llpkgc *generates* a parser, thus this script requires npm be available + +set -e +set -x +shopt -s dotglob + +readonly name="llpkgc" +readonly ownership="llpkgc upstream " +readonly subtree="Utilities/cmllpkgc" +readonly repo="https://gitlab.kitware.com/utils/llpkgc.git" +readonly tag="7958a1de42b9eec04676d547f6fcf5daa425fbcc" +readonly shortlog=false +readonly paths=" + bin + src + *.json +" + +extract_source() { + git_archive + npm install + npm run build + mv build/llpkgc/* "${extractdir}/${name}-reduced" + + pushd "${extractdir}/${name}-reduced" + rm CMakeLists.txt *.json + rm -rf src bin + echo "* -whitespace" > .gitattributes + popd +} + +. "${BASH_SOURCE%/*}/update-third-party.bash" diff --git a/Utilities/cmllpkgc/README.rst b/Utilities/cmllpkgc/README.rst new file mode 100644 index 0000000000..233a5750fe --- /dev/null +++ b/Utilities/cmllpkgc/README.rst @@ -0,0 +1,14 @@ +llpkgc +****** + +This code is generated by the upstream llpkgc repository located at: +https://gitlab.kitware.com/utils/llpkgc + +Generally, updates to llpkgc should be made in the upstream utilities library +unless they are exceptionally specific to CMake itself. + +The upstream repository does not vendor a generated copy of the parser, so +the associated update script for this dependency runs the generator and +vendors it appropriately. This requires a reasonably up-to-date version of +npm be available in addition to the normal 3rd-party update tooling +requirements.