For example: ./weeklyjob.sh --layer-dir ../meta-openembedded/ --layer-names "meta-oe"
Signed-off-by: Yoann Congal <yoann.con...@smile.fr> --- weeklyjob.sh | 59 +++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 58 insertions(+), 1 deletion(-) diff --git a/weeklyjob.sh b/weeklyjob.sh index 94598a2..00f3575 100755 --- a/weeklyjob.sh +++ b/weeklyjob.sh @@ -13,6 +13,59 @@ poky_dir=~/poky build_dir=~/build-tmp-auh-upgrades sstate_dir=~/sstate-cache +ARGS=$(getopt -o '' --long 'layer-dir:,layer-names:,layer-machines:' -n 'weeklyjob.sh' -- "$@") +if [ $? -ne 0 ]; then + echo 'Cannot parse arguments...' >&2 + exit 1 +fi +eval set -- "$ARGS" +unset ARGS + +LAYERDIR="." +LAYERNAMES="" +LAYERMACHINES="" +DEFAULT=1 + +while true; do + case "$1" in + '--layer-dir') + LAYERDIR=$(realpath $2) + DEFAULT=0 + shift 2 + continue + ;; + '--layer-names') + LAYERNAMES+=" $2" + DEFAULT=0 + shift 2 + continue + ;; + '--layer-machines') + LAYERMACHINES+=" $2" + DEFAULT=0 + shift 2 + continue + ;; + '--') + shift + break + ;; + *) + echo "Unexpected value $1" >&2 + exit 1 + ;; + esac +done + +# Default to poky/meta +if [ "$LAYERNAMES" == "" ]; then + LAYERNAMES="meta" +fi +# Default to qemux86-64 +if [ "$LAYERMACHINES" == "" ]; then + LAYERMACHINES="qemux86-64" +fi + pushd $poky_dir # Base the upgrades on poky master @@ -20,7 +73,11 @@ git fetch origin git checkout -B tmp-auh-upgrades origin/master source $poky_dir/oe-init-build-env $build_dir -$auh_dir/upgrade-helper.py -e all +if [ "$DEFAULT" -ne 0 ]; then + $auh_dir/upgrade-helper.py -e all +else + $auh_dir/upgrade-helper.py -e all --layer-dir $LAYERDIR --layer-names "$LAYERNAMES" --layer-machines "$LAYERMACHINES" +fi # clean up to avoid the disk filling up rm -rf $build_dir/tmp/ -- 2.30.2
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#61544): https://lists.yoctoproject.org/g/yocto/message/61544 Mute This Topic: https://lists.yoctoproject.org/mt/102309898/21656 Group Owner: yocto+ow...@lists.yoctoproject.org Unsubscribe: https://lists.yoctoproject.org/g/yocto/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-