fix install.sh to reflect new locations, tweak documentation where necessary

pull/125/head
William Ting 12 years ago
parent acfc5c13ef
commit 168865f138

@ -1,11 +1,14 @@
VERSION = v20
TAGNAME = release-$(VERSION)
.PHONY: docs install
.PHONY: docs install uninstall
install:
install.sh
uninstall:
uninstall.sh
docs:
pandoc -s -w man docs/manpage.md -o docs/autojump.1
pandoc -s -w markdown docs/manpage.md docs/install.md -o README.md
@ -14,12 +17,14 @@ release:
# Check for tag existence
# git describe release-$(VERSION) 2>&1 >/dev/null || exit 1
tools/git-version.sh $(TAGNAME)
# Modify autojump with version
./tools/git-version.sh $(TAGNAME)
# Commit the version change
git commit -m "version numbering" autojump
git commit -m "version numbering" ./bin/autojump
# Create tag
git tag -a $(TAGNAME)
# Create tagged archive
git archive --format=tar --prefix autojump_$(VERSION)/ $(TAGNAME) | gzip > autojump_$(VERSION).tar.gz

@ -6,11 +6,11 @@ Python v2.7+ or 3.2+
Bash v4.0+ for tab completion
If you are unable to update Python to a supported version, older versions of autojump can be [downloaded](https://github.com/joelthelion/autojump/downloads) and installed manually.
If you are unable to update Python to a supported version, older versions of autojump can be [downloaded][dl] and installed manually.
Python v2.6+ is supported by [release v19](https://github.com/downloads/joelthelion/autojump/autojump_v19.tar.gz).
Python v2.6+ is supported by [release v19][v19].
Python v2.4+ is supported by [release v12](https://github.com/downloads/joelthelion/autojump/autojump_v12.tar.gz).
Python v2.4+ is supported by [release v12][v12].
### AUTOMATIC INSTALLATION
@ -40,7 +40,7 @@ MacPorts also available:
**Other**
Please check the [Wiki](https://github.com/joelthelion/autojump/wiki) for an up to date listing of installation methods.
Please check the [Wiki][wiki] for an up to date listing of installation methods.
### MANUAL INSTALLATION
@ -71,3 +71,8 @@ Run the uninstallation script:
and follow on screen instructions.
If you keep getting `autojump: command not found` at the prompt, do:`unset PROMPT_COMMAND`. You can also restart your shell.
[dl]: https://github.com/joelthelion/autojump/downloads
[v12]: https://github.com/downloads/joelthelion/autojump/autojump_v12.tar.gz
[v19]: https://github.com/downloads/joelthelion/autojump/autojump_v19.tar.gz
[wiki]: https://github.com/joelthelion/autojump/wiki

@ -1,5 +1,5 @@
#!/usr/bin/env bash
#Copyright Joel Schaerer 2008, 2009
#Copyright Joel Schaerer 2008-2012
#This file is part of autojump
#autojump is free software: you can redistribute it and/or modify
@ -21,9 +21,9 @@ function add_msg {
echo
if [ "${1}" == "global" ]; then
echo -e "\t[[ -f /etc/profile.d/autojump.${2} ]] && source /etc/profile.d/autojump.${2}"
echo -e "\t[[ -s /etc/profile.d/autojump.${2} ]] && source /etc/profile.d/autojump.${2}"
elif [ "${1}" == "local" ]; then
echo -e "\t[[ -f ~/.autojump/etc/profile.d/autojump.${2} ]] && source ~/.autojump/etc/profile.d/autojump.${2}"
echo -e "\t[[ -s ~/.autojump/etc/profile.d/autojump.${2} ]] && source ~/.autojump/etc/profile.d/autojump.${2}"
fi
echo
@ -179,16 +179,16 @@ echo "Installing ${shell} version of autojump to ${prefix} ..."
echo
# add git revision to autojump
./git-version.sh
./tools/git-version.sh
# INSTALL AUTOJUMP
mkdir -p ${prefix}/share/autojump/
mkdir -p ${prefix}/bin/
mkdir -p ${prefix}/share/man/man1/
cp -v icon.png ${prefix}/share/autojump/
cp -v jumpapplet ${prefix}/bin/
cp -v autojump ${prefix}/bin/
cp -v autojump.1 ${prefix}/share/man/man1/
cp -v ./bin/icon.png ${prefix}/share/autojump/
cp -v ./bin/jumpapplet ${prefix}/bin/
cp -v ./bin/autojump ${prefix}/bin/
cp -v ./docs/autojump.1 ${prefix}/share/man/man1/
# global installation
if [ ! ${local} ]; then
@ -197,7 +197,7 @@ if [ ! ${local} ]; then
success=
fpath=`/usr/bin/env zsh -c 'echo $fpath'`
for f in ${fpath}; do
cp -v _j ${f} && success=true && break
cp -v ./bin/_j ${f} && success=true && break
done
if [ ! ${success} ]; then
@ -209,20 +209,20 @@ if [ ! ${local} ]; then
fi
if [ -d "/etc/profile.d" ]; then
cp -v autojump.sh /etc/profile.d/
cp -v autojump.${shell} /etc/profile.d/
cp -v ./bin/autojump.sh /etc/profile.d/
cp -v ./bin/autojump.${shell} /etc/profile.d/
add_msg "global" ${shell}
else
echo "Your distribution does not have a '/etc/profile.d/' directory, please create it manually or use the local install option."
fi
else # local installation
mkdir -p ${prefix}/etc/profile.d/
cp -v autojump.sh ${prefix}/etc/profile.d/
cp -v autojump.${shell} ${prefix}/etc/profile.d/
cp -v ./bin/autojump.sh ${prefix}/etc/profile.d/
cp -v ./bin/autojump.${shell} ${prefix}/etc/profile.d/
if [ ${shell} == "zsh" ]; then
mkdir -p ${prefix}/functions/
cp _j ${prefix}/functions/
cp ./bin/_j ${prefix}/functions/
fi
add_msg "local" ${shell}

@ -24,9 +24,9 @@ function remove_msg {
echo "Please remove the line from .${2}rc :"
echo
if [ "${1}" == "global" ]; then
echo -e "\t[[ -f /etc/profile.d/autojump.${2} ]] && source /etc/profile.d/autojump.${2}"
echo -e "\t[[ -s /etc/profile.d/autojump.${2} ]] && source /etc/profile.d/autojump.${2}"
elif [ "${1}" == "local" ]; then
echo -e "\t[[ -f ~/.autojump/etc/profile.d/autojump.${2} ]] && source ~/.autojump/etc/profile.d/autojump.${2}"
echo -e "\t[[ -s ~/.autojump/etc/profile.d/autojump.${2} ]] && source ~/.autojump/etc/profile.d/autojump.${2}"
fi
echo
}

Loading…
Cancel
Save