| 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.4 2007/01/06 18:46:49 kosmikus Exp $ |
3 | # $Header: /var/cvsroot/gentoo-x86/eclass/darcs.eclass,v 1.5 2007/06/17 21:33:57 kolmodin 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 | # |
| … | |
… | |
| 81 | export SANDBOX_WRITE="${SANDBOX_WRITE//:\/foobar:\/}" |
81 | export SANDBOX_WRITE="${SANDBOX_WRITE//:\/foobar:\/}" |
| 82 | fi |
82 | fi |
| 83 | |
83 | |
| 84 | # in case EDARCS_DARCS_DIR is a symlink to a dir, get the real |
84 | # in case EDARCS_DARCS_DIR is a symlink to a dir, get the real |
| 85 | # dir's path, otherwise addwrite() doesn't work. |
85 | # dir's path, otherwise addwrite() doesn't work. |
|
|
86 | pushd . |
| 86 | cd -P "$EDARCS_TOP_DIR" > /dev/null |
87 | cd -P "$EDARCS_TOP_DIR" > /dev/null |
| 87 | EDARCS_TOP_DIR="`/bin/pwd`" |
88 | EDARCS_TOP_DIR="`/bin/pwd`" |
| 88 | |
89 | |
| 89 | # disable the sandbox for this dir |
90 | # disable the sandbox for this dir |
| 90 | addwrite "$EDARCS_TOP_DIR" |
91 | addwrite "$EDARCS_TOP_DIR" |
| … | |
… | |
| 108 | elif [ "${mode}" == "update" ]; then |
109 | elif [ "${mode}" == "update" ]; then |
| 109 | einfo "Running $cmdupdate" |
110 | einfo "Running $cmdupdate" |
| 110 | eval $cmdupdate || die "darcs update command failed" |
111 | eval $cmdupdate || die "darcs update command failed" |
| 111 | fi |
112 | fi |
| 112 | |
113 | |
|
|
114 | popd |
| 113 | } |
115 | } |
| 114 | |
116 | |
| 115 | |
117 | |
| 116 | darcs_src_unpack() { |
118 | darcs_src_unpack() { |
| 117 | local EDARCS_SHOPT |
119 | local EDARCS_SHOPT |