source: devel/contrib/mkctn @ 2374

Last change on this file since 2374 was 2374, checked in by bruno, 5 months ago

Fix support for non pb projects ctn

  • Property svn:executable set to *
File size: 991 bytes
Line 
1#!/bin/bash
2#
3PBPRJ=$1
4DISTRO=$2
5DISTROVER=$3
6ORIGREPO=$4
7ARCH=x86_64
8
9M=$DISTRO-$DISTROVER-$ARCH
10
11if [ _"$PBPRJ" = _"" ]; then
12    echo "Syntax: mkctn project distro version [repo]"
13    exit -1
14fi
15if [ _"$DISTRO" = _"mageia" ]; then
16    ORIGREPO=mageiaofficial
17    DISTROVER=${DISTROVER}-$ARCH
18elif [ _"$DISTRO" = _"opensuse" ]; then
19    vm=`echo $DISTROVER | cut -d . -f1`
20    if [ $vm -ge 15 ] && [ $vm -lt 42 ]; then 
21        ORIGREPO=opensuse/leap
22    else
23        ORIGREPO=$DISTRO
24    fi
25else
26    ORIGREPO="$DISTRO"
27fi
28
29echo "Working on $M ..."
30echo "-----------------------------------"
31if [ _"$DISTRO" != _"mageia" ]; then
32    docker pull ${ORIGREPO}:$DISTROVER
33fi
34pb -p pb -T docker --stop-on-error -m $M newve -i ${ORIGREPO}:$DISTROVER && \
35pb -p pb -T docker --stop-on-error -m $M sbx2setupve all
36if [ $PBPRJ != "pb" ]; then
37    pb -p $PBPRJ -T docker --stop-on-error -m $M sbx2build all
38fi
39pb -p $PBPRJ -T docker --stop-on-error -m $M prepve && \
40pb -p $PBPRJ -T docker --stop-on-error -m $M build2ve
41docker image prune -f
42
Note: See TracBrowser for help on using the repository browser.