diff options
author | Colin Walters <walters@verbum.org> | 2011-11-17 18:29:32 -0500 |
---|---|---|
committer | Colin Walters <walters@verbum.org> | 2011-11-17 18:29:32 -0500 |
commit | e588a47ba6349a1e0fc9148ab390115625a3bdad (patch) | |
tree | dbffb10599ba9910b1747340a52ed937a50d28fc | |
parent | a8735778f09b897330d4a48e44cb4c1e62442af5 (diff) | |
download | ostree-e588a47ba6349a1e0fc9148ab390115625a3bdad.tar.gz |
gnomeos: Have commit-yocto-build make more assumptions
This is so it's easier to use.
-rwxr-xr-x | gnomeos/yocto/commit-yocto-build.sh | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/gnomeos/yocto/commit-yocto-build.sh b/gnomeos/yocto/commit-yocto-build.sh index 78d2343b..c53b330e 100755 --- a/gnomeos/yocto/commit-yocto-build.sh +++ b/gnomeos/yocto/commit-yocto-build.sh @@ -4,6 +4,8 @@ set -e set -x +WORKDIR=`pwd` + if test $(id -u) = 0; then cat <<EOF This script should not be run as root. @@ -12,23 +14,22 @@ EOF fi usage () { - echo "$0 OSTREE_REPO_PATH BINARY_TAR" + echo "$0 BRANCH" exit 1 } -OSTREE_REPO=$1 -test -n "$OSTREE_REPO" || usage -shift -BUILD_TAR=$1 -test -n "$BUILD_TAR" || usage +BRANCH=$1 +test -n "$BRANCH" || usage shift -origcwd=`pwd` +OSTREE_REPO=$WORKDIR/repo +BUILD_TAR=$WORKDIR/tmp-eglibc/deploy/images/gnomeos-contents-$BRANCH-qemux86.tar.gz + tempdir=`mktemp -d tmp-commit-yocto-build.XXXXXXXXXX` cd $tempdir mkdir fs cd fs fakeroot -s ../fakeroot.db tar xf $BUILD_TAR -fakeroot -i ../fakeroot.db ostree --repo=${OSTREE_REPO} commit -s "Build (need ostree git version here)" -b gnomeos-base -cd ${origcwd} +fakeroot -i ../fakeroot.db ostree --repo=${OSTREE_REPO} commit -s "Build (need ostree git version here)" -b "gnomeos-$BRANCH" +cd "${WORKDIR}" rm -rf $tempdir |