Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Adding support for checkout of particular tag/branch

Signed-off-by: Radek Dostal <rd@radekdostal.com>
  • Loading branch information...
commit 26ef55c9d94c06ebbd5352fa94a74fe00336735e 1 parent 949ecf2
Radek Dostál authored May 04, 2012 koenkooi committed May 04, 2012

Showing 2 changed files with 30 additions and 0 deletions. Show diff stats Hide diff stats

  1. 22  oebb.sh
  2. 8  scripts/layerman
22  oebb.sh
@@ -355,6 +355,16 @@ function layer_info()
355 355
 }
356 356
 
357 357
 ###############################################################################
  358
+# checkout - Checkout all layers with a given tag
  359
+###############################################################################
  360
+function checkout()
  361
+{
  362
+set_environment
  363
+env gawk -v command=checkout -v commandarg=$TAG -f ${OE_BASE}/scripts/layers.awk ${OE_SOURCE_DIR}/layers.txt 
  364
+}
  365
+
  366
+
  367
+###############################################################################
358 368
 # Build the specified OE packages or images.
359 369
 ###############################################################################
360 370
 
@@ -397,6 +407,17 @@ then
397 407
         exit 0
398 408
     fi
399 409
     
  410
+    if [ $1 = "checkout" ]
  411
+    then
  412
+        if [ -z $2 ] ; then
  413
+            echo "Checkout needs an argument"
  414
+            exit 1
  415
+        else
  416
+            TAG="$2"
  417
+        fi
  418
+        checkout
  419
+        exit 0
  420
+    fi
400 421
     if [ $1 = "bitbake" ]
401 422
     then
402 423
         shift
@@ -426,6 +447,7 @@ echo "Usage: $0 config <machine>"
426 447
 echo "       $0 update"
427 448
 echo "       $0 tag [tagname]"
428 449
 echo "       $0 changelog <tagname>"
  450
+echo "       $0 checkout <tagname>"
429 451
 echo "       $0 clean"
430 452
 echo ""
431 453
 echo "       Not recommended, but also possible:"
8  scripts/layerman
@@ -90,6 +90,12 @@ function diff_tags() {
90 90
     echo ""
91 91
 }
92 92
 
  93
+function checkout_tag() {
  94
+    check_layer
  95
+    cd ${LAYERDIR} && echo "Checking out $COMMANDARG" && git checkout $COMMANDARG
  96
+    echo ""
  97
+}
  98
+
93 99
 case $COMMAND in
94 100
 tag)
95 101
     tag_layers;;
@@ -97,6 +103,8 @@ changelog)
97 103
     diff_tags;;
98 104
 info)
99 105
 	get_info;;
  106
+checkout)
  107
+    checkout_tag;;	
100 108
 *)
101 109
     update_layers;;
102 110
 esac

0 notes on commit 26ef55c

Please sign in to comment.
Something went wrong with that request. Please try again.