diff options
Diffstat (limited to 'scripts/mkimage.sh')
-rw-r--r-- | scripts/mkimage.sh | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/scripts/mkimage.sh b/scripts/mkimage.sh index 806247213b..6ad9200434 100644 --- a/scripts/mkimage.sh +++ b/scripts/mkimage.sh @@ -53,6 +53,7 @@ usage() { $0 [--tag RELEASE] [--outdir OUTDIR] [--workdir WORKDIR] [--arch ARCH] [--profile PROFILE] [--hostkeys] [--simulate] + [--yaml FILE] $0 --help options: @@ -64,6 +65,7 @@ options: --simulate Don't execute commands --tag Build images for tag RELEASE --workdir Specify temporary working directory (cache) +--yaml known profiles: $(echo $all_profiles | sort -u) @@ -172,6 +174,11 @@ build_profile() { ${_c}sum "$output_file" > "${output_file}.${_c}" done fi + + if [ -n "$_yaml_out" ]; then + $mkimage_yaml --release $RELEASE \ + "$output_file" >> "$_yaml_out" + fi fi } @@ -179,6 +186,8 @@ build_profile() { load_plugins "$(dirname $0)" [ -z "$HOME" ] || load_plugins "$HOME/.mkimage" +mkimage_yaml="$(dirname $0)"/mkimage-yaml.sh + # parse parameters while [ $# -gt 0 ]; do opt="$1" @@ -193,6 +202,7 @@ while [ $# -gt 0 ]; do --hostkeys) _hostkeys="--hostkeys";; --simulate) _simulate="yes";; --checksum) _checksum="yes";; + --yaml) _yaml="yes";; --) break ;; -*) usage; exit 1;; esac @@ -233,6 +243,10 @@ for ARCH in $req_arch; do fi abuild-apk update --root "$APKROOT" + if [ "$_yaml" = "yes" ]; then + _yaml_out=${OUTDIR:-.}/latest-release.yaml + echo "---" > "$_yaml_out" + fi for PROFILE in $req_profiles; do (build_profile) || exit 1 done |