| 1 | # Copyright 1999-2011 Gentoo Foundation |
1 | # Copyright 1999-2011 Gentoo Foundation |
| 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/user.eclass,v 1.6 2011/11/03 00:26:17 vapier Exp $ |
3 | # $Header: /var/cvsroot/gentoo-x86/eclass/user.eclass,v 1.7 2011/11/03 00:35:07 vapier Exp $ |
| 4 | |
4 | |
| 5 | # @ECLASS: user.eclass |
5 | # @ECLASS: user.eclass |
| 6 | # @MAINTAINER: |
6 | # @MAINTAINER: |
| 7 | # base-system@gentoo.org (Linux) |
7 | # base-system@gentoo.org (Linux) |
| 8 | # Joe Jezak <josejx@gmail.com> (OS X) |
8 | # Joe Jezak <josejx@gmail.com> (OS X) |
| … | |
… | |
| 410 | # @DESCRIPTION: |
410 | # @DESCRIPTION: |
| 411 | # Gets the home directory for the specified user. |
411 | # Gets the home directory for the specified user. |
| 412 | egethome() { |
412 | egethome() { |
| 413 | local pos |
413 | local pos |
| 414 | |
414 | |
|
|
415 | [[ $# -eq 1 ]] || die "usage: egethome <user>" |
|
|
416 | |
| 415 | case ${CHOST} in |
417 | case ${CHOST} in |
| 416 | *-darwin*|*-freebsd*|*-dragonfly*) |
418 | *-darwin*|*-freebsd*|*-dragonfly*) |
| 417 | pos=9 |
419 | pos=9 |
| 418 | ;; |
420 | ;; |
| 419 | *) # Linux, NetBSD, OpenBSD, etc... |
421 | *) # Linux, NetBSD, OpenBSD, etc... |