From c65b1079454dd161caf164ca9ef8df7a5a26ff93 Mon Sep 17 00:00:00 2001 From: ben Date: Sat, 10 Jan 2009 12:38:13 +0000 Subject: num neo uiae und asdf angeglichen, kleine bugfixes git-svn-id: https://svn.neo-layout.org@1420 b9310e46-f624-0410-8ea1-cfbb3a30dc96 --- linux/bin/neo | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'linux/bin/neo') diff --git a/linux/bin/neo b/linux/bin/neo index 902bd04..96c5b42 100755 --- a/linux/bin/neo +++ b/linux/bin/neo @@ -1,5 +1,24 @@ #!/bin/sh +# colour definitions +normal="\033[0m" +red="\033[31m" +orange="\033[33m" +green="\033[32m" + +if [ "foo`echo -e bar`" = "foobar" ];then + # GNU echo + ECHO_e="echo -e" +else + # POSIX echo + ECHO_e="echo" +fi + +die() { + $ECHO_e "${red}$@${normal}" >&2 + exit 1 +} + if [ -f "${NEO_CONFIG}" ]; then . "${NEO_CONFIG}" || die "Failed to source ${NEO_CONFIG}" elif [ -f "${HOME}"/.neorc ]; then -- cgit v1.2.3