summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app-admin/eselect-emacs/files/emacs-updater')
-rwxr-xr-xapp-admin/eselect-emacs/files/emacs-updater122
1 files changed, 0 insertions, 122 deletions
diff --git a/app-admin/eselect-emacs/files/emacs-updater b/app-admin/eselect-emacs/files/emacs-updater
deleted file mode 100755
index 7f94d97..0000000
--- a/app-admin/eselect-emacs/files/emacs-updater
+++ /dev/null
@@ -1,122 +0,0 @@
-#!/bin/bash
-
-# Copyright 2007-2008 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id: emacs-updater,v 1.3 2008/03/08 06:53:06 ulm Exp $
-
-# Authors:
-# Christian Faulhammer <opfer@gentoo.org>
-# Ulrich Mueller <ulm@gentoo.org>
-
-VERSION=0.6
-SITELISP=/usr/share/emacs/site-lisp
-TMPFILE="$(mktemp /tmp/emacs-updater.XXXXXX)"
-
-cat <<-EOF
-
-Emacs updater version ${VERSION}
-Written by the Gentoo Emacs team http://www.gentoo.org/proj/en/lisp/emacs/
-Find packages that are installed in the wrong location
-
-EOF
-
-usage() {
- sed -e 's/^X//' <<-EOF
- Usage: ${0##*/} [OPTION]...
- X -n, --nocolour disable colour in output
- X -p, --pretend don't actually emerge packages
- X -h, --help display this help and exit
- EOF
- exit ${1}
-}
-
-# Read in all command-line options and force English output
-OPTIONS=$(LC_ALL=C getopt -o hpn --long help,pretend,nocolour \
- -n 'emacs-updater' -- "$@")
-[ $? -eq 0 ] || usage 1
-
-eval set -- "${OPTIONS}"
-
-while true
-do
- case "${1}" in
- -h|--help) usage 0 ;;
- -p|--pretend) PRETEND="true"; shift 1 ;;
- -n|--nocolour) NOCOLOUR="true"; shift 1 ;;
- --) shift; break ;;
- esac
-done
-
-# Only set colours if output is not redirected or the --no-colour
-# option is not set
-if [ -t 1 ] && [ -z "${NOCOLOUR}" ] ; then
- RED=$(tput -S <<<$'setaf 1\nbold')
- GREEN=$(tput -S <<<$'setaf 2\nbold')
- YELLOW=$(tput -S <<<$'setaf 3\nbold')
- BLUE=$(tput -S <<<$'setaf 4\nbold')
- MAGENTA=$(tput -S <<<$'setaf 5\nbold')
- CYAN=$(tput -S <<<$'setaf 6\nbold')
- BOLD=$(tput bold)
- NORMAL=$(tput sgr0)
-fi
-
-message() {
- local OUTPUT=$@
- echo "${GREEN}*${NORMAL}${BOLD} ${OUTPUT}${NORMAL}"
-}
-
-warning() {
- local OUTPUT=$@
- echo "${YELLOW}*${NORMAL}${BOLD} ${OUTPUT}${NORMAL}"
-}
-
-failure() {
- local OUTPUT=$@
- echo "${RED}*${NORMAL}${BOLD} ${OUTPUT}${NORMAL}"
-}
-
-if ! [ -x /usr/bin/qfile ]; then
- echo
- failure "Please emerge app-portage/portage-utils to use this tool"
- exit 1
-fi
-
-for sf in "${ROOT}${SITELISP}"/[0-9][0-9]*-gentoo.el
-do
- [ "${sf##*/}" = 00site-gentoo.el ] && continue
- message "Processing ${sf##*/} ..."
- qfile -qCR "${sf}" >> "${TMPFILE}"
-done
-echo
-
-if [ ! -s "${TMPFILE}" ]; then
- warning "No packages to update, quitting."
- exit 2
-fi
-
-NO_OF_PACKAGES=$(sed -n '$=' "${TMPFILE}")
-
-[ ${NO_OF_PACKAGES} -eq 1 ] && s= || s=s
-message "${NO_OF_PACKAGES} package${s} with site files in the wrong location:"
-cat "${TMPFILE}"
-
-if [ "${PRETEND}" ]; then
- exit 3
-fi
-
-echo
-echo -n "${BOLD}Remerge packages?${NORMAL} [${GREEN}Yes${NORMAL}/${RED}No${NORMAL}] "
-read choice
-echo
-case "${choice}" in
- y*|Y*|"")
- ;;
- *)
- warning "Quitting."
- exit 10 ;;
-esac
-
-emerge --oneshot --ask --verbose $(cat "${TMPFILE}")
-
-warning "If a package is being rebuilt over and over again,"
-warning "please report it on http://bugs.gentoo.org/"