aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/checkout
blob: 17e9a2d8f09645fe5fa47ef525a01a9ce61aba48 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#!/bin/sh
# (C) 2016-10-25 Yong-iL Joh
# License: MPLv2

export LANG=C
MYDIR=$(dirname "$0")

update_git() {
  _git=$1
  _cur_dir=`pwd`
  if [ -d ../${_git} ]; then
     cd ../${_git}
     _null=`git status >& /dev/null`
     _r=$?
     if [ $_r -eq 0 ]; then
        git checkout master >& /dev/null
        git pull            >& /dev/null
        cd ${_cur_dir}
     else
        echo "fatal: Not a git repository"
        exit 2
     fi
  else
     echo "there is no such directory: $_git "
     exit 1
  fi
}

update_git poky
$MYDIR/checkout_layer_hash.sh poky
update_git meta-openembedded
$MYDIR/checkout_layer_hash.sh meta-openembedded
update_git meta-gplv2
$MYDIR/checkout_layer_hash.sh meta-gplv2