contrib/dockerrpm
author Chinmay Joshi <c@chinmayjoshi.com>
Sat, 21 Jun 2014 14:44:09 +0530
changeset 21803 62cc4055c6c8
parent 21642 76a347bcdb33
child 22438 f5abb231b80a
permissions -rwxr-xr-x
hg: use vfs functions in clone This change applies vfs functions in clone. destvfs.exists will invoke os.path.lexists via lexists of vfs to check for broken symbolic links.

#!/bin/bash

BUILDDIR=$(dirname $0)
ROOTDIR=$(cd $BUILDDIR/..; pwd)

if which docker.io >> /dev/null ; then
  DOCKER=docker.io
elif which docker >> /dev/null ; then
  DOCKER=docker
fi

$DOCKER build --tag "hg-dockerrpm-$1" - < $BUILDDIR/docker/$1
$DOCKER run --rm -v $ROOTDIR:/hg "hg-dockerrpm-$1" bash -c \
    "cp -a hg hg-build; cd hg-build; make clean local $1; cp packages/$1/* /hg/packages/$1/"