ports/151467: New port: sysutils/autojump acts as a complement to cd
Neeraj Verma
neeraj.verma at vermatech.com
Sun Oct 17 23:30:13 UTC 2010
The following reply was made to PR ports/151467; it has been noted by GNATS.
From: Neeraj Verma <neeraj.verma at vermatech.com>
To: Jilles Tjoelker <jilles at stack.nl>
Cc: bug-followup at FreeBSD.org, neeraj.verma.ports at vermatech.com
Subject: Re: ports/151467: New port: sysutils/autojump acts as a complement
to cd
Date: Sun, 17 Oct 2010 19:23:34 -0400
The following has been modified to work with zsh.
Use this instead...
# This is a shell archive. Save it in a file, remove anything before
# this line, and then unpack it by entering "sh file". Note, it may
# create directories; files and directories will be owned by you and
# have default permissions.
#
# This archive contains:
#
# autojump
# autojump/files
# autojump/files/patch-autojump
# autojump/files/patch-install.zsh
# autojump/files/patch-install.sh
# autojump/pkg-descr
# autojump/distinfo
# autojump/Makefile
#
echo c - autojump
mkdir -p autojump > /dev/null 2>&1
echo c - autojump/files
mkdir -p autojump/files > /dev/null 2>&1
echo x - autojump/files/patch-autojump
sed 's/^X//' >autojump/files/patch-autojump <<
'6917d57faf6ecf383ae7da8503e66008'
X--- ./autojump.orig 2010-10-01 10:49:18.000000000 -0400
X+++ ./autojump 2010-10-17 19:00:36.000000000 -0400
X@@ -1,4 +1,4 @@
X-#!/usr/bin/python
X+#!/usr/local/bin/python
X #Copyright Joel Schaerer 2008, 2009
X #This file is part of autojump
X
6917d57faf6ecf383ae7da8503e66008
echo x - autojump/files/patch-install.zsh
sed 's/^X//' >autojump/files/patch-install.zsh <<
'd02a62ee01389e4b53e4877dbeb4f3f9'
X--- ./install.zsh.orig 2010-10-17 19:08:50.000000000 -0400
X+++ ./install.zsh 2010-10-17 19:09:05.000000000 -0400
X@@ -1,4 +1,4 @@
X-#! /bin/zsh
X+#! /usr/local/bin/zsh
X #Copyright Joel Schaerer 2008, 2009
X #This file is part of autojump
X
X@@ -19,7 +19,7 @@
X echo "sudo ./install.sh [--prefix /usr/local]"
X }
X
X-prefix=/usr
X+prefix=/usr/local
X
X #command line parsing
X while true; do
X@@ -39,19 +39,19 @@
X
X echo "Installing main files to ${prefix} ..."
X
X-sudo mkdir -p ${prefix}/share/autojump/
X-sudo mkdir -p ${prefix}/bin/
X-sudo mkdir -p ${prefix}/share/man/man1/
X-sudo cp icon.png ${prefix}/share/autojump/
X-sudo cp jumpapplet ${prefix}/bin/
X-sudo cp autojump ${prefix}/bin/
X-sudo cp autojump.1 ${prefix}/share/man/man1/
X+mkdir -p ${prefix}/share/autojump/
X+mkdir -p ${prefix}/bin/
X+mkdir -p ${prefix}/share/man/man1/
X+cp icon.png ${prefix}/share/autojump/
X+cp jumpapplet ${prefix}/bin/
X+cp autojump ${prefix}/bin/
X+cp autojump.1 ${prefix}/share/man/man1/
X
X # autocompletion file in the first directory of the FPATH variable
X fail=true
X for f in $fpath
X do
X- sudo cp _j $f && fail=false && break
X+ cp _j $f && fail=false && break
X done
X if $fail
X then
X@@ -61,18 +61,18 @@
X echo "Installed autocompletion file to $f"
X fi
X
X-if [ -d "/etc/profile.d" ]; then
X- sudo cp autojump.zsh /etc/profile.d/
X- sudo cp autojump.sh /etc/profile.d/
X+if [ -d "/usr/local/etc/profile.d" ]; then
X+ cp autojump.zsh /usr/local/etc/profile.d/
X+ cp autojump.sh /usr/local/etc/profile.d/
X echo "Remember to add the line"
X- echo " source /etc/profile.d/autojump.zsh"
X+ echo " source /usr/local/etc/profile.d/autojump.zsh"
X echo "or"
X- echo " source /etc/profile"
X+ echo " source /usr/local/etc/profile"
X echo "to your ~/.zshrc if it's not there already"
X echo
X echo "You need to source your ~/.zshrc (source ~/.zshrc) before
you can start using autojump."
X else
X- echo "Your distribution does not have a /etc/profile.d directory,
the default that we install one of the scripts to. Would you like us to
copy it into your ~/.zshrc file to make it work? (If you have done this
once before, delete the old version before doing it again.) [y/n]"
X+ echo "Your distribution does not have a /usr/local/etc/profile.d
directory, the default that we install one of the scripts to. Would you
like us to copy it into your ~/.zshrc file to make it work? (If you have
done this once before, delete the old version before doing it again.)
[y/n]"
X read ans
X if [ ${#ans} -gt 0 ]; then
X if [ $ans = "y" -o $ans = "Y" -o $ans = "yes" -o $ans = "Yes" ];
then
d02a62ee01389e4b53e4877dbeb4f3f9
echo x - autojump/files/patch-install.sh
sed 's/^X//' >autojump/files/patch-install.sh <<
'dffdbfd25a1b39a4ce4177d40a358e55'
X--- ./install.sh.orig 2010-10-01 10:49:18.000000000 -0400
X+++ ./install.sh 2010-10-17 19:00:36.000000000 -0400
X@@ -1,4 +1,4 @@
X-#!/bin/bash
X+#!/usr/local/bin/bash
X #Copyright Joel Schaerer 2008, 2009
X #This file is part of autojump
X
X@@ -16,11 +16,11 @@
X #along with autojump. If not, see <http://www.gnu.org/licenses/>.
X
X function show_help {
X- echo "sudo ./install.sh [--prefix /usr/local]"
X+ echo "./install.sh [--prefix /usr/local]"
X }
X
X # Default install directory.
X-prefix=/usr
X+prefix=/usr/local
X
X # Command line parsing
X while true; do
X@@ -41,32 +41,32 @@
X echo "Installing to ${prefix} ..."
X
X # INSTALL AUTOJUMP
X-sudo mkdir -p ${prefix}/share/autojump/
X-sudo mkdir -p ${prefix}/bin/
X-sudo mkdir -p ${prefix}/share/man/man1/
X-sudo cp icon.png ${prefix}/share/autojump/
X-sudo cp jumpapplet ${prefix}/bin/
X-sudo cp autojump ${prefix}/bin/
X-sudo cp autojump.1 ${prefix}/share/man/man1/
X+mkdir -p ${prefix}/share/autojump/
X+mkdir -p ${prefix}/bin/
X+mkdir -p ${prefix}/share/man/man1/
X+cp icon.png ${prefix}/share/autojump/
X+cp jumpapplet ${prefix}/bin/
X+cp autojump ${prefix}/bin/
X+cp autojump.1 ${prefix}/share/man/man1/
X
X-if [ -d "/etc/profile.d" ]; then
X- sudo cp autojump.bash /etc/profile.d/
X- sudo cp autojump.sh /etc/profile.d/
X+if [ -d "${prefix}/etc/profile.d" ]; then
X+ cp autojump.bash ${prefix}/etc/profile.d/
X+ cp autojump.sh ${prefix}/etc/profile.d/
X
X # Make sure that the code we just copied has been sourced.
X- # check if .bashrc has sourced /etc/profile
or /etc/profile.d/autojump.bash
X+ # check if .bashrc has sourced /etc/profile or
${prefix}/etc/profile.d/autojump.bash
X if [ `grep -c "^[[:space:]]*source\|\. /etc/profile(\.d/autojump
\.bash)[[:space:]]*$" ~/.bashrc` -eq 0 ]; then
X- echo "Your .bashrc doesn't seem to source /etc/profile
or /etc/profile.d/autojump.bash"
X- echo "Adding the /etc/profile.d/autojump.bash to your .bashrc"
X+ echo "Your .bashrc doesn't seem to source /etc/profile or
${prefix}/etc/profile.d/autojump.bash"
X+ echo "Adding the ${prefix}/etc/profile.d/autojump.bash to
your .bashrc"
X echo "" >> ~/.bashrc
X echo "# Added by autojump install.sh" >> ~/.bashrc
X- echo "source /etc/profile.d/autojump.bash" >> ~/.bashrc
X+ echo "source ${prefix}/etc/profile.d/autojump.bash" >>
~/.bashrc
X fi
X echo "Done!"
X echo
X echo "You need to source your ~/.bashrc (source ~/.bashrc) before
you can start using autojump."
X else
X- echo "Your distribution does not have a /etc/profile.d directory,
the default that we install one of the scripts to. Would you like us to
copy it into your ~/.bashrc file to make it work? (If you have done this
once before, delete the old version before doing it again.) [y/n]"
X+ echo "Your distribution does not have a ${prefix}/etc/profile.d
directory, the default that we install one of the scripts to. Would you
like us to copy it into your ~/.bashrc file to make it work? (If you
have done this once before, delete the old version before doing it
again.) [y/n]"
X read ans
X if [ ${#ans} -gt 0 ]; then
X if [ $ans = "y" -o $ans = "Y" -o $ans = "yes" -o $ans =
"Yes" ]; then
dffdbfd25a1b39a4ce4177d40a358e55
echo x - autojump/pkg-descr
sed 's/^X//' >autojump/pkg-descr << 'af87931262491898c6ab1cc3c3ddac55'
XAutojump is a tool that acts as a complement to cd: it makes navigating
your filesystem a lot faster. It works by automagically maintaining a
database of the directories you use the most from the command line, and
allows you to jump back and forth between them, by typing just a few
letters of the name of the directory you want to jump to.
X
XWWW: http://github.com/joelthelion/autojump/wiki
X
af87931262491898c6ab1cc3c3ddac55
echo x - autojump/distinfo
sed 's/^X//' >autojump/distinfo << '60a32d51eebaff511cac7ae3e366850a'
XMD5 (autojump_v13.tar.gz) = 13e4e6173f4ed63b8babb00fcd95f600
XSHA256 (autojump_v13.tar.gz) =
020ef781b30f8cbe4f183f2ccadac720e3f747e82924aaa4b95da01d76cc2153
XSIZE (autojump_v13.tar.gz) = 22723
60a32d51eebaff511cac7ae3e366850a
echo x - autojump/Makefile
sed 's/^X//' >autojump/Makefile << '64238b552e4fe3c222efa4fdde5e5897'
X# New ports collection makefile for: autojump
X# Date created: 12 October 2010
X# Whom: Neeraj Verma <neeraj.verma.ports at vermatech.com>
X#
X# $FreeBSD$
X#
X
XPORTNAME= autojump
XDISTNAME= autojump_v13
XPORTVERSION= v13
XDISTFILES= autojump_v13.tar.gz
XCATEGORIES= sysutils
XMASTER_SITES= http://github.com/downloads/joelthelion/autojump/ \
X http://www.vermatech.com/distfiles/
X
XMAINTAINER= neeraj.verma.ports at vermatech.com
XCOMMENT= Autojump is a tool that acts as a complement to cd: it
makes navigating your filesystem a lot faster. It works by automagically
maintaining a database of the directories you use the most from the
command line, and allows you to jump back and forth between them, by
typing just a few letters of the name of the directory you want to jump
to.
X
XPLIST_FILES= bin/autojump \
X bin/jumpapplet \
X share/autojump/icon.png \
X share/man/man1/autojump.1 \
X etc/profile.d/autojump.sh
X
XPLIST_FILES+= etc/profile.d/autojump.bash
X
XOPTIONS= ZSH "Install zsh version as well." On
X
X.include <bsd.port.options.mk>
X
X.if defined(WITH_ZSH)
XPLIST_FILES+= etc/profile.d/autojump.zsh
XRUN_DEPENDS= ${LOCALBASE}/bin/bash:${PORTSDIR}/shells/bash \
X ${LOCALBASE}/bin/zsh:${PORTSDIR}/shells/zsh
X.else
XRUN_DEPENDS= ${LOCALBASE}/bin/bash:${PORTSDIR}/shells/bash
X.endif
X
XPLIST_DIRS= share/autojump
X
X
X.if !target(do-build)
Xdo-build:
X# do nothing since the program is all scripts based.
X.endif
X
X.if !target(do-install)
Xdo-install:
X @(cd ${INSTALL_WRKSRC} && ./install.sh )
X.if defined(WITH_ZSH)
X @(cd ${INSTALL_WRKSRC} && ./install.zsh )
X.endif
X.endif
X
X.include <bsd.port.mk>
X
64238b552e4fe3c222efa4fdde5e5897
exit
On Sat, 2010-10-16 at 14:50 +0200, Jilles Tjoelker wrote:
> > [new port for autojump]
>
> Upstream seems to offer a zsh version as well, why did you omit it?
>
More information about the freebsd-ports-bugs
mailing list