aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Stephen P. Bennett <spb@exherbo.org> 2006-05-26 23:57:45 +0000
committerAvatar Stephen P. Bennett <spb@exherbo.org> 2006-05-26 23:57:45 +0000
commitaf052c5b224e62c5573b6d15ac57bfd056db7cc6 (patch)
tree97ab4227e49895775c64fc868c64e2b3fbdc1137
parent542bbe00a8889431aa59cd39fbb76cb64b0748c0 (diff)
downloadpaludis-af052c5b224e62c5573b6d15ac57bfd056db7cc6.tar.gz
paludis-af052c5b224e62c5573b6d15ac57bfd056db7cc6.tar.xz
Fix pinkness in bash
-rw-r--r--configure.ac10
-rw-r--r--ebuild/echo_functions.bash.in (renamed from ebuild/echo_functions.bash)26
-rwxr-xr-xhooks/eselect_env_update.bash3
-rwxr-xr-xhooks/find_config_updates.bash3
-rwxr-xr-xhooks/news.bash3
5 files changed, 35 insertions, 10 deletions
diff --git a/configure.ac b/configure.ac
index 90c5dbe..0dbd2d5 100644
--- a/configure.ac
+++ b/configure.ac
@@ -332,14 +332,17 @@ AM_CONDITIONAL([ENABLE_QA], test "x$ENABLE_QA" = "xyes")
dnl }}}
dnl {{{ colourschemes
-AC_MSG_CHECKING([which colourscheme to use])
+AC_MSG_CHECKING([whether we like pink])
AC_ARG_ENABLE([pink],
[ --enable-pink Make it pink],
[WANT_PINK=$enableval
- AC_MSG_RESULT([pink])],
+ AC_MSG_RESULT([$enableval])
+ COLOURSCHEME=pink],
[WANT_PINK=no
- AC_MSG_RESULT([default])])
+ AC_MSG_RESULT([no :(])
+ COLOURSCHEME=default])
AM_CONDITIONAL([WANT_PINK], test "x$WANT_PINK" = "xyes")
+AC_SUBST([COLOURSCHEME])
if test x"$WANT_PINK" = "xyes"; then
AC_DEFINE([PALUDIS_COLOUR_PINK], 1, [Are we pinkified?])
else
@@ -387,6 +390,7 @@ AC_OUTPUT(
ebuild/Makefile
ebuild/digests/Makefile
ebuild/utils/Makefile
+ ebuild/echo_functions.bash
eselect/Makefile
hooks/Makefile
misc/Makefile
diff --git a/ebuild/echo_functions.bash b/ebuild/echo_functions.bash.in
index 016e136..bd0f4f6 100644
--- a/ebuild/echo_functions.bash
+++ b/ebuild/echo_functions.bash.in
@@ -1,6 +1,8 @@
#!/bin/bash
# vim: set sw=4 sts=4 et :
+@GENERATED_FILE@
+
# Copyright (c) 2006 Ciaran McCreesh <ciaran.mccreesh@blueyonder.co.uk>
#
# Based in part upon ebuild.sh from Portage, which is Copyright 1995-2005
@@ -21,10 +23,26 @@
# this program; if not, write to the Free Software Foundation, Inc., 59 Temple
# Place, Suite 330, Boston, MA 02111-1307 USA
-COLOUR_GOOD=$'\e[32;01m'
-COLOUR_WARN=$'\e[33;01m'
-COLOUR_BAD=$'\e[31;01m'
-COLOUR_BRACKET=$'\e[34;01m'
+[[ -z ${PALUDIS_COLOURS} ]] && PALUDIS_COLOURS=@COLOURSCHEME@
+
+COLOUR_GREEN=$'\e[32;01m'
+COLOUR_YELLOW=$'\e[33;01m'
+COLOUR_RED=$'\e[31;01m'
+COLOUR_BLUE=$'\e[34;01m'
+COLOUR_PINK=$'\e[35;01m'
+
+if [[ ${PALUDIS_COLOURS} == pink ]]; then
+ COLOUR_GOOD=${COLOUR_PINK}
+ COLOUR_WARN=${COLOUR_YELLOW}
+ COLOUR_BAD=${COLOUR_RED}
+ COLOUR_BRACKET=${COLOUR_PINK}
+else
+ COLOUR_GOOD=${COLOUR_GREEN}
+ COLOUR_WARN=${COLOUR_YELLOW}
+ COLOUR_BAD=${COLOUR_RED}
+ COLOUR_BRACKET=${COLOUR_BLUE}
+fi
+
COLOUR_NORMAL=$'\e[0m'
PALUDIS_ENDCOL=$'\e[A\e['$(( ${COLUMNS:-80} - 7 ))'G'
diff --git a/hooks/eselect_env_update.bash b/hooks/eselect_env_update.bash
index 117c818..436eb3e 100755
--- a/hooks/eselect_env_update.bash
+++ b/hooks/eselect_env_update.bash
@@ -17,7 +17,8 @@
# this program; if not, write to the Free Software Foundation, Inc., 59 Temple
# Place, Suite 330, Boston, MA 02111-1307 USA
-source /sbin/functions.sh
+export PATH="$(${PALUDIS_EBUILD_DIR}/utils/canonicalise ${PALUDIS_EBUILD_DIR}/utils/ ):${PATH}"
+source ${PALUDIS_EBUILD_DIR}/echo_functions.bash
echo
einfo "Regenerating environment..."
diff --git a/hooks/find_config_updates.bash b/hooks/find_config_updates.bash
index a570ff3..fb2ff72 100755
--- a/hooks/find_config_updates.bash
+++ b/hooks/find_config_updates.bash
@@ -17,7 +17,8 @@
# this program; if not, write to the Free Software Foundation, Inc., 59 Temple
# Place, Suite 330, Boston, MA 02111-1307 USA
-source /sbin/functions.sh
+export PATH="$(${PALUDIS_EBUILD_DIR}/utils/canonicalise ${PALUDIS_EBUILD_DIR}/utils/ ):${PATH}"
+source ${PALUDIS_EBUILD_DIR}/echo_functions.bash
echo
einfo "Searching for configuration files requiring action..."
diff --git a/hooks/news.bash b/hooks/news.bash
index 22946c5..f20e2fa 100755
--- a/hooks/news.bash
+++ b/hooks/news.bash
@@ -17,7 +17,8 @@
# this program; if not, write to the Free Software Foundation, Inc., 59 Temple
# Place, Suite 330, Boston, MA 02111-1307 USA
-source /sbin/functions.sh
+export PATH="$(${PALUDIS_EBUILD_DIR}/utils/canonicalise ${PALUDIS_EBUILD_DIR}/utils/ ):${PATH}"
+source ${PALUDIS_EBUILD_DIR}/echo_functions.bash
mkdir -p ${ROOT}/var/lib/paludis/news/