Permalink
Browse files

Adding support for checkout of particular tag/branch

Signed-off-by: Radek Dostal <rd@radekdostal.com>
  • Loading branch information...
1 parent 949ecf2 commit 26ef55c9d94c06ebbd5352fa94a74fe00336735e @dasty dasty committed with koenkooi May 4, 2012
Showing with 30 additions and 0 deletions.
  1. +22 −0 oebb.sh
  2. +8 −0 scripts/layerman
View
22 oebb.sh
@@ -355,6 +355,16 @@ function layer_info()
}
###############################################################################
+# checkout - Checkout all layers with a given tag
+###############################################################################
+function checkout()
+{
+set_environment
+env gawk -v command=checkout -v commandarg=$TAG -f ${OE_BASE}/scripts/layers.awk ${OE_SOURCE_DIR}/layers.txt
+}
+
+
+###############################################################################
# Build the specified OE packages or images.
###############################################################################
@@ -397,6 +407,17 @@ then
exit 0
fi
+ if [ $1 = "checkout" ]
+ then
+ if [ -z $2 ] ; then
+ echo "Checkout needs an argument"
+ exit 1
+ else
+ TAG="$2"
+ fi
+ checkout
+ exit 0
+ fi
if [ $1 = "bitbake" ]
then
shift
@@ -426,6 +447,7 @@ echo "Usage: $0 config <machine>"
echo " $0 update"
echo " $0 tag [tagname]"
echo " $0 changelog <tagname>"
+echo " $0 checkout <tagname>"
echo " $0 clean"
echo ""
echo " Not recommended, but also possible:"
View
8 scripts/layerman
@@ -90,13 +90,21 @@ function diff_tags() {
echo ""
}
+function checkout_tag() {
+ check_layer
+ cd ${LAYERDIR} && echo "Checking out $COMMANDARG" && git checkout $COMMANDARG
+ echo ""
+}
+
case $COMMAND in
tag)
tag_layers;;
changelog)
diff_tags;;
info)
get_info;;
+checkout)
+ checkout_tag;;
*)
update_layers;;
esac

0 comments on commit 26ef55c

Please sign in to comment.