majorly revised configure

parent 9df3629a
......@@ -22,7 +22,8 @@ SECTION=$1
CHKS_COUNTER=$(grep -w ${SECTION}[0-9]* .configure/depends | wc -l)
DONE_COUNTER=1
section_message $2 $3
shift
section_message $@
while (( $DONE_COUNTER <= $CHKS_COUNTER )); do
DEPENDENCY=$(grep -w ${SECTION}${DONE_COUNTER} .configure/depends | gawk '{print $2}')
......@@ -47,7 +48,8 @@ SECTION=$1
CHKS_COUNTER=$(grep -w ${SECTION}[0-9]* .configure/depends | wc -l)
DONE_COUNTER=1
section_message $2 $3
shift
section_message $@
while (( $DONE_COUNTER <= $CHKS_COUNTER )); do
DEPENDENCY=$(grep -w ${SECTION}${DONE_COUNTER} .configure/depends | gawk '{print $2}')
......@@ -79,7 +81,8 @@ SECTION=$1
CHKS_COUNTER=$(grep -w ${SECTION}[0-9]* .configure/depends | wc -l)
DONE_COUNTER=1
section_message $2 $3
shift
section_message $@
while (( $DONE_COUNTER <= $CHKS_COUNTER )); do
DEPENDENCY=$(grep -w ${SECTION}${DONE_COUNTER} .configure/depends | gawk '{print $2}')
......
#!/bin/bash
display_help () {
echo -e "\n${GREEN}BashStyle-NG ${YELLOW}(configure) ${CYAN}help"
echo -e "\n${WHITE}Options:\n"
echo -e "\n${ORANGE}--help${WHITE} |${GREEN} Display this help message\
\n${ORANGE}--mm${WHITE} |${GREEN} Enter Maintainer Mode (disable checks)\
\n${ORANGE}--prefix=${WHITE} |${GREEN} Change Installation Prefix (default /usr)" | column -t
echo ""
tput sgr0
}
......@@ -52,13 +52,14 @@ warn_message () {
maintainer_message () {
echo -e "\n${RED}Maintainer Mode ${WHITE}/ ${GREEN}Disabled Checks\n"
echo -e "\n${RED}Maintainer Mode ${WHITE}/ ${GREEN}Disabled Checks"
tput sgr0
}
end_message () {
export PATH="$OLDPATH"
echo -e "\n${YELLOW}Prefix:${WHITE} $PREFIX\n"
if [[ $ERR_MSG != "" ]]; then
echo -e "${YELLOW}Notes:\
......@@ -67,3 +68,16 @@ end_message () {
tput sgr0
}
help_message () {
echo -e "\n${GREEN}BashStyle-NG ${YELLOW}(configure) ${CYAN}help"
echo -e "\n${WHITE}Options:\n"
echo -e "\n${ORANGE}--help${WHITE} |${GREEN} Display this help message\
\n${ORANGE}--maintainer${WHITE} |${GREEN} Enter Maintainer Mode (disables checks)\
\n${ORANGE}--prefix=${WHITE} |${GREEN} Change Installation Prefix (default: /usr)\
\n${ORANGE}--dirinfo-disable${WHITE} |${GREEN} Disable Dirinfo Flags (default: enable)" | column -t
echo ""
tput sgr0
}
#!/bin/bash
IN_FILES="Makefile rc/nx-rc code/bsng.py data/bashstyle data/bashstyle-ng.pc data/bashstyle-profile"
IN_FILES=( Makefile rc/nx-rc data/bashstyle data/bashstyle-ng.pc data/bashstyle-profile )
SUB_VERSION_FILES=( data/bashstyle-ng.pc rc/nx-rc )
SUB_PREFIX_FILES=( Makefile data/bashstyle-ng.pc data/bashstyle data/bashstyle-profile rc/nx-rc )
copy_in_files () {
for in_file in $IN_FILES; do
cp ${in_file}.in ${in_file};
for in_file in ${IN_FILES[@]}; do
cp "${in_file}".in "${in_file}";
done
}
......@@ -13,10 +16,12 @@ copy_in_files () {
substitute_values () {
# substitute VERSION
sed -e "s>@VERSION@>$xVERSION>g" -i data/bashstyle-ng.pc code/bsng.py rc/nx-rc
sed -e "s>@VERSION@>$xVERSION>g" -i ${SUB_VERSION_FILES[@]}
# substitute PREFIX
sed -e "s>@PREFIX@>$PREFIX>g" -i Makefile data/bashstyle-ng.pc code/bsng.py\
data/bashstyle data/bashstyle-profile rc/nx-rc
sed -e "s>@PREFIX@>$PREFIX>g" -i ${SUB_PREFIX_FILES[@]}
# substitute DIRINFO_ENABLE
sed -e "s>@DIRINFO_ENABLE@>$DIRINFO_ENABLE>g" -i data/bashstyle-profile
}
......@@ -71,7 +71,6 @@ distclean: clean
clean:
@echo -e "$(SMOOTHBLUE)cleaning up"
@rm -f data/bashstyle
@rm -f code/bsng.py
@rm -f rc/nx-rc
@rm -f Makefile
@rm -f data/bashstyle-ng.pc
......
Overview of changes in v7.12 "Planetary Collapse"
!!! IMPORTANT NOTE !!!
This version of BS-NG installs wrappers for cp, mv and rm, which
honour the NoCopy, NoMove and NoDelete .dirinfo-flags (see below).
To disable them, pass --dirinfo-disable to configure!
=== Bugfixes ===
* #105 (unmark): properly unalias the bookmark
* #106 (bookmark): don't create a bookmark when no name is given
......@@ -29,6 +35,10 @@ Overview of changes in v7.12 "Planetary Collapse"
* use our own check function rather than which
(percebtibly faster)
* improved checking for python modules
* majorly revised the configure script
=== Added Features ===
* dbg_log (internal)
* dbg_finalize (internal)
......@@ -143,6 +153,7 @@ Overview of changes in v7.12 "Planetary Collapse"
=== Misc Changes ===
* list Kenny Meyer in the about-dialog
* major restructurering
* only load xdel on Bash >= 4.x
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
......
......@@ -26,6 +26,8 @@ if FAILED:
print "The following modules failed to import: %s" % (" ".join(FAILED))
sys.exit(1)
PREFIX = commands.getoutput('pkg-config --variable=prefix bashstyle-ng')
parser = optparse.OptionParser("bashstyle <option> [value]\
\n\nBashStyle-NG © 2007 - 2010 Christopher Bratusek\
\nLicensed under the GNU GENERAL PUBLIC LICENSE v3")
......@@ -152,7 +154,7 @@ class BashStyleNG(object):
_ = self.lang.gettext
gtkbuilder.set_translation_domain(APP_NAME)
gtkbuilder.add_from_file("@PREFIX@/share/bashstyle-ng/data/bashstyle7.ui")
gtkbuilder.add_from_file(PREFIX + "/share/bashstyle-ng/data/bashstyle7.ui")
self.use_bashstyle = gtkbuilder.get_object("use_bashstyle")
self.use_bashstyle.set_active(gdb.get_bool(gbase + "use_bashstyle"))
......@@ -1818,7 +1820,7 @@ class BashStyleNG(object):
self.show_cpb_help = gtkbuilder.get_object("show_cpb_help")
def do_show_cpb_help(widget, data=None):
subprocess.Popen("x-www-browser @PREFIX@/share/doc/bashstyle-ng/chapter07.html", shell=True)
subprocess.Popen("x-www-browser " + PREFIX + "/share/doc/bashstyle-ng/chapter07.html", shell=True)
self.show_cpb_help.connect("clicked", do_show_cpb_help)
......@@ -2412,7 +2414,7 @@ class BashStyleNG(object):
if position <= 9:
notebook.set_current_page(position)
elif position == 10:
subprocess.Popen("x-www-browser @PREFIX@/share/doc/bashstyle-ng/index.html", shell=True)
subprocess.Popen("x-www-browser " + PREFIX + "/share/doc/bashstyle-ng/index.html", shell=True)
elif position == 11:
aboutdialog.show_all()
aboutdialog.connect("response", about_destroy, None)
......
......@@ -4,74 +4,66 @@ shopt -s extglob
source $PWD/.configure/base
source $PWD/.configure/color
source $PWD/.configure/messages
source $PWD/.configure/help
source $PWD/.configure/checks
source $PWD/.configure/substitute
case $1 in
*mm | *maint* )
shift
xcount=0
pcount=$#
while [[ $xcount -lt $pcount ]]; do
case $1 in
*maintainer )
MODE=MAINTAINER
;;
*prefix* )
PREFIX=$(echo $1 | gawk -F \= '{ print $2 }')
PREFIX="${1/*=}"
;;
* )
PREFIX=/usr
*dirinfo-disable )
DIRINFO_ENABLE="false"
;;
esac
maintainer_message
copy_in_files
substitute_values
export PATH="$OLDPATH"
end_message
*help )
MODE=HELP
;;
esac
shift
xcount=$(($xcount+1))
done
;;
unset xcount
*help )
if [[ ! $PREFIX ]]; then
PREFIX="/usr"
fi
display_help
if [[ ! $DIRINFO_ENABLE ]]; then
DIRINFO_ENABLE="true"
fi
;;
if [[ ! $MODE ]]; then
MODE=USER
fi
* )
if [[ $MODE == HELP ]]; then
help_message
elif [[ $MODE == MAINTAINER ]]; then
case $1 in
maintainer_message
copy_in_files
substitute_values
end_message
*prefix* )
PREFIX=$(echo $1 | gawk -F \= '{ print $2 }')
;;
* )
PREFIX=/usr
;;
esac
elif [[ $MODE == USER ]]; then
start_message
check_apps APP Required Applications
check_apps OPT_APP Optional Applications
check_apps OPT_SBINAPP Optional Superuser-Applications
#check_libs LIB Required Libraries
check_pymods PYMOD Required Python-Modules
check_apps APP Required Applications
check_apps OPT_APP Optional Applications
check_apps OPT_SBINAPP Optional Superuser-Applications
check_pymods PYMOD Required Python-Modules
copy_in_files
substitute_values
export PATH="$OLDPATH"
end_message
;;
esac
tput sgr0
fi
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment