mirror of
https://github.com/rkt/rkt.git
synced 2025-08-06 13:48:46 +08:00
scripts: New file sort-stage1-manifests
Signed-off-by: Geoff Levand <geoff@infradead.org>
This commit is contained in:
@ -80,6 +80,8 @@ done
|
||||
Usually, there are some updated libraries which need an update on their version numbers.
|
||||
In our case, there are no updates and all the files mentioned in the manifest are present in the updated Container Linux image.
|
||||
|
||||
If any of the manifest files have been modified run the script `scripts/sort-stage1-manifests.sh` to keep the manifest files in sorted order.
|
||||
|
||||
## Update the coreos flavor version used by the build system
|
||||
|
||||
In the file `stage1/usr_from_coreos/coreos-common.mk`, we define which Container Linux image version we use for the coreos flavor.
|
||||
|
28
scripts/sort-stage1-manifests.sh
Executable file
28
scripts/sort-stage1-manifests.sh
Executable file
@ -0,0 +1,28 @@
|
||||
#!/bin/bash
|
||||
# Usage: [TOP_DIR=directory] sort-stage1-manifests.sh
|
||||
|
||||
set -e
|
||||
|
||||
: ${TOP_DIR:="$( cd "$( dirname "${BASH_SOURCE[0]}" )/.." && pwd )"}
|
||||
|
||||
tmp=$(mktemp --tmpdir manifest-sort-XXX)
|
||||
|
||||
cleanup () {
|
||||
rm -f ${tmp}
|
||||
}
|
||||
|
||||
trap cleanup EXIT
|
||||
|
||||
boards='amd64-usr arm64-usr'
|
||||
flavors='usr_from_coreos usr_from_kvm'
|
||||
|
||||
for board in ${boards}; do
|
||||
for flavor in ${flavors}; do
|
||||
dir="${TOP_DIR}/stage1/${flavor}/manifest-${board}.d/"
|
||||
files=$(find ${dir} -type f -name '*.manifest')
|
||||
for f in ${files}; do
|
||||
cat ${f} | sort | uniq | sed '/^$/d' > ${tmp}
|
||||
cp ${tmp} ${f}
|
||||
done
|
||||
done
|
||||
done
|
Reference in New Issue
Block a user