install
author Paul Crowley <paul@lshift.net>
Fri, 20 Feb 2009 11:06:44 +0000
changeset 40 abbb822779da
parent 39 f5055ce263c7
child 44 cf851f3ddf16
permissions -rwxr-xr-x
unite install scripts

#!/bin/sh

set -e

install -o root -g root -d /usr/local/lib/mercurial-server
install -o root -g root -t /usr/local/lib/mercurial-server \
    src/hg-ssh \
    src/do-refresh-auth
install -o root -g root -t /usr/local/lib/mercurial-server -m 644 \
    src/access.py \
    src/ruleset.py
install -o root -g root -d /usr/local/lib/mercurial-server/init
install -o root -g root -t /usr/local/lib/mercurial-server/init \
    src/init/hginit
install -o root -g root -t /usr/local/lib/mercurial-server/init -m 644 \
    src/init/hgadmin-hgrc
install -o root -g root -d /etc/mercurial-server
install -o root -g root -t /etc/mercurial-server \
    src/init/conf/hg-ssh-wrapper \
    src/init/conf/refresh-auth
install -o root -g root -t /etc/mercurial-server -m 644 \
    src/init/conf/remote-hgrc \
    src/init/conf/access.conf
install -o root -g root -d /etc/mercurial-server/keys/root

if [ x$(getent passwd hg) == x ] ; then
    adduser --system --shell /bin/sh --group --disabled-password \
        --gecos "Mercurial repositories" hg
    su -c /usr/local/lib/mercurial-server/init/hginit hg
fi