/[gentoo-x86]/eclass/darcs.eclass
Gentoo

Diff of /eclass/darcs.eclass

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.1 Revision 1.2
1# Copyright 2004 Gentoo Technologies, Inc. 1# Copyright 2004 Gentoo Technologies, Inc.
2# Distributed under the terms of the GNU General Public License v2 2# Distributed under the terms of the GNU General Public License v2
3# $Header: /var/cvsroot/gentoo-x86/eclass/darcs.eclass,v 1.1 2006/05/22 23:05:24 kosmikus Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/darcs.eclass,v 1.2 2006/08/10 22:52:47 dcoutts Exp $
4# 4#
5# darcs eclass author: Andres Loeh <kosmikus@gentoo.org> 5# darcs eclass author: Andres Loeh <kosmikus@gentoo.org>
6# tla eclass author: <rphillips@gentoo.org> 6# tla eclass author: <rphillips@gentoo.org>
7# Original Author: Jeffrey Yasskin <jyasskin@mail.utexas.edu> 7# Original Author: Jeffrey Yasskin <jyasskin@mail.utexas.edu>
8# 8#
28# --- begin ebuild-configurable settings 28# --- begin ebuild-configurable settings
29 29
30# darcs command to run 30# darcs command to run
31[ -z "$EDARCS_DARCS_CMD" ] && EDARCS_DARCS_CMD="darcs" 31[ -z "$EDARCS_DARCS_CMD" ] && EDARCS_DARCS_CMD="darcs"
32 32
33# darcs commands with options 33# darcs commands with command-specific options
34[ -z "$EDARCS_GET_CMD" ] && EDARCS_GET_CMD="get" 34[ -z "$EDARCS_GET_CMD" ] && EDARCS_GET_CMD="get"
35[ -z "$EDARCS_UPDATE_CMD" ] && EDARCS_UPDATE_CMD="pull" 35[ -z "$EDARCS_UPDATE_CMD" ] && EDARCS_UPDATE_CMD="pull"
36
37# options to pass to both the "get" and "update" commands
38[ -z "$EDARCS_OPTIONS" ] && EDARCS_OPTIONS="--set-scripts-executable"
36 39
37# Where the darcs repositories are stored/accessed 40# Where the darcs repositories are stored/accessed
38[ -z "$EDARCS_TOP_DIR" ] && EDARCS_TOP_DIR="${PORTAGE_ACTUAL_DISTDIR-${DISTDIR}}/darcs-src" 41[ -z "$EDARCS_TOP_DIR" ] && EDARCS_TOP_DIR="${PORTAGE_ACTUAL_DISTDIR-${DISTDIR}}/darcs-src"
39 42
40# The URI to the repository. 43# The URI to the repository.
93 mode=update 96 mode=update
94 cd "$EDARCS_TOP_DIR/$EDARCS_LOCALREPO" 97 cd "$EDARCS_TOP_DIR/$EDARCS_LOCALREPO"
95 fi 98 fi
96 99
97 # commands to run 100 # commands to run
98 local cmdget="${EDARCS_DARCS_CMD} ${EDARCS_GET_CMD} --repo-name=${EDARCS_LOCALREPO} ${EDARCS_REPOSITORY}" 101 local cmdget="${EDARCS_DARCS_CMD} ${EDARCS_GET_CMD} ${EDARCS_OPTIONS} --repo-name=${EDARCS_LOCALREPO} ${EDARCS_REPOSITORY}"
99 local cmdupdate="${EDARCS_DARCS_CMD} ${EDARCS_UPDATE_CMD} --all ${EDARCS_REPOSITORY}" 102 local cmdupdate="${EDARCS_DARCS_CMD} ${EDARCS_UPDATE_CMD} --all ${EDARCS_OPTIONS} ${EDARCS_REPOSITORY}"
100 103
101 if [ "${mode}" == "get" ]; then 104 if [ "${mode}" == "get" ]; then
102 einfo "Running $cmdget" 105 einfo "Running $cmdget"
103 eval $cmdget || die "darcs get command failed" 106 eval $cmdget || die "darcs get command failed"
104 elif [ "${mode}" == "update" ]; then 107 elif [ "${mode}" == "update" ]; then
115 118
116 debug-print "$FUNCNAME: init: 119 debug-print "$FUNCNAME: init:
117 EDARCS_DARCS_CMD=$EDARCS_DARCS_CMD 120 EDARCS_DARCS_CMD=$EDARCS_DARCS_CMD
118 EDARCS_GET_CMD=$EDARCS_GET_CMD 121 EDARCS_GET_CMD=$EDARCS_GET_CMD
119 EDARCS_UPDATE_CMD=$EDARCS_UPDATE_CMD 122 EDARCS_UPDATE_CMD=$EDARCS_UPDATE_CMD
123 EDARCS_OPTIONS=$EDARCS_OPTIONS
120 EDARCS_TOP_DIR=$EDARCS_TOP_DIR 124 EDARCS_TOP_DIR=$EDARCS_TOP_DIR
121 EDARCS_REPOSITORY=$EDARCS_REPOSITORY 125 EDARCS_REPOSITORY=$EDARCS_REPOSITORY
122 EDARCS_LOCALREPO=$EDARCS_LOCALREPO 126 EDARCS_LOCALREPO=$EDARCS_LOCALREPO
123 EDARCS_CLEAN=$EDARCS_CLEAN" 127 EDARCS_CLEAN=$EDARCS_CLEAN"
124 128

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.2

  ViewVC Help
Powered by ViewVC 1.1.20