diff options
Diffstat (limited to 'scripts/checkout')
-rwxr-xr-x | scripts/checkout | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/scripts/checkout b/scripts/checkout index 17e9a2d..c0652a6 100755 --- a/scripts/checkout +++ b/scripts/checkout @@ -4,10 +4,10 @@ export LANG=C MYDIR=$(dirname "$0") +cur_dir=`pwd` update_git() { _git=$1 - _cur_dir=`pwd` if [ -d ../${_git} ]; then cd ../${_git} _null=`git status >& /dev/null` @@ -15,7 +15,7 @@ update_git() { if [ $_r -eq 0 ]; then git checkout master >& /dev/null git pull >& /dev/null - cd ${_cur_dir} + cd ${cur_dir} else echo "fatal: Not a git repository" exit 2 @@ -26,9 +26,15 @@ update_git() { fi } +if [ ! -d ../poky ]; then + echo "there is no poky layers on $PWD/.." + exit 1 +fi update_git poky $MYDIR/checkout_layer_hash.sh poky update_git meta-openembedded $MYDIR/checkout_layer_hash.sh meta-openembedded +if [ -d ../meta-gplv2 ]; then update_git meta-gplv2 $MYDIR/checkout_layer_hash.sh meta-gplv2 +fi |