# $Id: Portfile 76597 2011-03-01 19:30:15Z jmr@macports.org $

PortSystem      1.0

name            cdargs
version         1.35
revision        1
categories      sysutils
maintainers     entropy.ch:reg.macports
description     Bookmarks for the shell
long_description \
    CDargs heavily enhances the navigation of the common unix \
    file-system inside the shell. It plugs into the shell built-in \
    cd-command (via a shell function or an alias) and thus adds \
    bookmarks and a browser to it. It enables you to move to a very \
    distant place in the file-system with just a few keystrokes. \
    This is the kind of thing that power shell users invent when even \
    the almighty and wonderful TAB-completion is too much typing.

homepage        http://www.skamphausen.de/cgi-bin/ska/CDargs

platforms       darwin

master_sites    http://www.skamphausen.de/downloads/cdargs/

checksums       md5 50be618d67f0b9f2439526193c69c567 \
                sha1 20017d09d3259fcd1385754554a3e17a1c975f9b \
                rmd160 44cbe35281ab29fa48149792c34afa61d117e33d

configure.args  --mandir=${prefix}/share/man

patchfiles      patch-contrib-cdargs-bash.sh.diff

post-destroot {
    # Install helper files not installed by the Makefile
    xinstall -d ${destroot}${prefix}/etc/profile.d
    xinstall -m 644 -W ${worksrcpath}/contrib \
        cdargs-bash.sh \
        cdargs-tcsh.csh \
        ${destroot}${prefix}/etc/profile.d
}

post-activate {
    ui_msg "
To use ${name}, you need to source it from your shell's startup file.

If you're using bash or zsh, add these lines to your bash startup file:

    if \[ -f ${prefix}/etc/profile.d/cdargs-bash.sh \]; then
        source ${prefix}/etc/profile.d/cdargs-bash.sh
    fi

If you're using tcsh, add these lines to your tcsh startup file:

    if ( -f ${prefix}/etc/profile.d/cdargs-tcsh.csh ) then
        source ${prefix}/etc/profile.d/cdargs-tcsh.csh
    endif
"
}

livecheck.url   [lindex ${master_sites} 0]?N=D
livecheck.regex ${name}-(\[0-9.\]+)\\.tar
