From e4dcf0931e77974047d68518c349e8adfbac70e2 Mon Sep 17 00:00:00 2001 From: Andreas Cord-Landwehr Date: Mon, 21 Jun 2021 20:58:58 +0200 Subject: [PATCH] Add plasma-mobile release script --- scripts/plasma-mobile-release.sh | 53 ++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100755 scripts/plasma-mobile-release.sh diff --git a/scripts/plasma-mobile-release.sh b/scripts/plasma-mobile-release.sh new file mode 100755 index 0000000..dd1c16a --- /dev/null +++ b/scripts/plasma-mobile-release.sh @@ -0,0 +1,53 @@ +#!/bin/bash +# +# add/remove Plasma Mobile release recipes +# +# SPDX-FileCopyrightText: 2019 Volker Krause +# SPDX-FileCopyrightText: 2021 Andreas Cord-Landwehr +# +# SPDX-License-Identifier: MIT + +function usage() +{ + echo "$1 [add|remove|update] []" + exit 1 +} + +command=$1 +if [ -z "$command" ]; then usage $0; fi + +version=$2 +if [ -z "$version" ]; then usage $0; fi + +base=`dirname $0`/../recipes-plasma-mobile + +case $command in +add) + for recipe in `find $base -name "*.inc" | grep -v /staging/`; do + name=`echo $recipe | sed -e "s,\.inc,_${version}.bb,"` +cat < $name +# SPDX-FileCopyrightText: none +# SPDX-License-Identifier: CC0-1.0 + +require \${PN}.inc +SRCREV = "v\${PV}" +EOM + git add $name + done + ;; +remove) + for recipe in `find $base -name "*_$version.bb"`; do + git rm -f $recipe + done + ;; +update) + new_version=$3 + for recipe in `find $base -name "*_$version.bb"`; do + new_recipe=`echo $recipe | sed -e "s,$version,$new_version,"` + git mv $recipe $new_recipe + done + ;; +*) + usage $0 + ;; +esac