Mercurial > hg
annotate contrib/dockerrpm @ 22373:f6a1386d540e
revert: no backup for `dsadded` set
There is only one case where a backup is required in the `dsadded` set, and the
current backup mechanism fails to handle it. So we stop trying to do backups at
all for now. This will help us to simplify the backup code and finally fix
this backup issue.
author | Pierre-Yves David <pierre-yves.david@fb.com> |
---|---|
date | Sat, 30 Aug 2014 01:49:28 +0200 |
parents | 76a347bcdb33 |
children | f5abb231b80a |
rev | line source |
---|---|
21255
62a2749895e4
build: initial support for in-tree autobuilding recipes
Matt Mackall <mpm@selenic.com>
parents:
diff
changeset
|
1 #!/bin/bash |
62a2749895e4
build: initial support for in-tree autobuilding recipes
Matt Mackall <mpm@selenic.com>
parents:
diff
changeset
|
2 |
62a2749895e4
build: initial support for in-tree autobuilding recipes
Matt Mackall <mpm@selenic.com>
parents:
diff
changeset
|
3 BUILDDIR=$(dirname $0) |
62a2749895e4
build: initial support for in-tree autobuilding recipes
Matt Mackall <mpm@selenic.com>
parents:
diff
changeset
|
4 ROOTDIR=$(cd $BUILDDIR/..; pwd) |
62a2749895e4
build: initial support for in-tree autobuilding recipes
Matt Mackall <mpm@selenic.com>
parents:
diff
changeset
|
5 |
21642
76a347bcdb33
docker: check for docker.io first
Matt Mackall <mpm@selenic.com>
parents:
21561
diff
changeset
|
6 if which docker.io >> /dev/null ; then |
76a347bcdb33
docker: check for docker.io first
Matt Mackall <mpm@selenic.com>
parents:
21561
diff
changeset
|
7 DOCKER=docker.io |
76a347bcdb33
docker: check for docker.io first
Matt Mackall <mpm@selenic.com>
parents:
21561
diff
changeset
|
8 elif which docker >> /dev/null ; then |
21255
62a2749895e4
build: initial support for in-tree autobuilding recipes
Matt Mackall <mpm@selenic.com>
parents:
diff
changeset
|
9 DOCKER=docker |
62a2749895e4
build: initial support for in-tree autobuilding recipes
Matt Mackall <mpm@selenic.com>
parents:
diff
changeset
|
10 fi |
62a2749895e4
build: initial support for in-tree autobuilding recipes
Matt Mackall <mpm@selenic.com>
parents:
diff
changeset
|
11 |
62a2749895e4
build: initial support for in-tree autobuilding recipes
Matt Mackall <mpm@selenic.com>
parents:
diff
changeset
|
12 $DOCKER build --tag "hg-dockerrpm-$1" - < $BUILDDIR/docker/$1 |
62a2749895e4
build: initial support for in-tree autobuilding recipes
Matt Mackall <mpm@selenic.com>
parents:
diff
changeset
|
13 $DOCKER run --rm -v $ROOTDIR:/hg "hg-dockerrpm-$1" bash -c \ |
21561
f1bcc33a5c52
docker: update package target to packages/
Matt Mackall <mpm@selenic.com>
parents:
21255
diff
changeset
|
14 "cp -a hg hg-build; cd hg-build; make clean local $1; cp packages/$1/* /hg/packages/$1/" |