Skip to content

Commit

Permalink
give some color to autogen.sh
Browse files Browse the repository at this point in the history
Certainly not so useful but not hurt either.
  • Loading branch information
devzero2000 committed Nov 25, 2011
1 parent e284710 commit 824add9
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 16 deletions.
2 changes: 2 additions & 0 deletions CHANGES
@@ -1,4 +1,6 @@
1.17 -> 2.0:
- devzero2000: give some color to autogen.sh
Certainly not so useful but not hurt either.
- jbj: i18n: msgmerge (Translation Project).
- devzero2000: redo commit 8396019
Useless to have format crap just for conforming
Expand Down
48 changes: 32 additions & 16 deletions autogen.sh
@@ -1,4 +1,5 @@
#!/bin/sh
#
# $Id$
# autogen.sh: autogen.sh script for popt projects
#
Expand All @@ -7,17 +8,32 @@
# This program have the same copyright notice as popt
# itself
#
# Global Function and Variables
#
_PROGNAME="$0"
#
red=; grn=; lgn=; blu=; std=;
test "X$$TERM" != Xdumb \
&& test -t 1 2>/dev/null \
&& { \
red=''; \
grn=''; \
lgn=''; \
blu=''; \
std=''; \
}

Die() {
color="$red"
echo "${color}${_PROGNAME}: Error: $@${std}" >&2
exit 1
}

Notice() {
color="$grn"
echo "${color}${_PROGNAME}: $@${std}"
}

# Guess whether we are using configure.ac or configure.in
if test -f configure.ac; then
conffile="configure.ac"
elif test -f configure.in; then
conffile="configure.in"
else
echo "$0: could not find configure.ac or configure.in"
exit 1
fi

# Function Used for ichecking the Version Used for building
#
Expand Down Expand Up @@ -128,18 +144,17 @@ autopoint -
gettext 0.17
libtool 1.5.22
"

echo "$0: Bootstrapping popt build system..."
echo

Notice "Bootstrapping popt build system..."
echo
# Guess whether we are using configure.ac or configure.in
if test -f configure.ac; then
conffile="configure.ac"
elif test -f configure.in; then
conffile="configure.in"
else
echo "$0: could not find configure.ac or configure.in"
exit 1
Die "could not find configure.ac or configure.in"
echo
fi

if ! printf "$buildreq" | check_versions; then
Expand All @@ -162,7 +177,8 @@ case $libtoolize in
esac
esac
if test -z "$libtoolize"; then
echo "$0: libtool not found."
Die "libtool not found."
echo
fi
find . -name "autom4te.cache" | xargs rm -rf
[ ! -d m4 ] && mkdir m4
Expand All @@ -175,7 +191,7 @@ ls "$po_dir"/*.po 2>/dev/null |

#
echo
echo "$0: done. Now you can run './configure'."
Notice "done. Now you can run './configure'."
#######################
# End Bootstrapping
#######################

0 comments on commit 824add9

Please sign in to comment.