Skip to Content.
Sympa Menu

sm-sorcery-bugs - [SM-Sorcery-Bugs] [Bug 5278] New: configure_optional

sm-sorcery-bugs AT lists.ibiblio.org

Subject: Bugs for Sorcery are reported here

List archive

Chronological Thread  
  • From: bugzilla-daemon AT metalab.unc.edu
  • To: sm-sorcery-bugs AT lists.ibiblio.org
  • Subject: [SM-Sorcery-Bugs] [Bug 5278] New: configure_optional
  • Date: Wed, 17 Dec 2003 03:56:03 -0500

http://bugs.sourcemage.org/show_bug.cgi?id=5278

Summary: configure_optional
Product: Sorcery
Version: Feature Request
Platform: Other
OS/Version: other
Status: NEW
Severity: normal
Priority: P2
Component: Sorcery
AssignedTo: sm-sorcery-bugs AT lists.ibiblio.org
ReportedBy: hgr AT vabo.cz


Several spells contain function configure_optional, for example winex,
gnomeicu, xchat.

It would be fine if this function was part of the sorcery.
We could call only for example:
configure_optional 'ipv6' '--enable-ipv6' '--disable-ipv6' 'enable IPv6
default: no)' n


# @usage configure_optional <1:test> <2:enable-option> <3:disable-option>
<4:prompt> <5:hint>
# works right if <test> is part of both <enable-option> and <disable-option>
# @return 0 if disabled
function configure_optional() {
if ! grep -q "${1#-}" $SPELL_CONFIG; then
local OPTION="$2"
query "$4" "$5" || OPTION="$3"
echo "OPTS=\"\$OPTS $OPTION\"" >> $SPELL_CONFIG
fi
# return the `enabled' flag for the option
grep -q "${2#--}" $SPELL_CONFIG
}



------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.



  • [SM-Sorcery-Bugs] [Bug 5278] New: configure_optional, bugzilla-daemon, 12/17/2003

Archive powered by MHonArc 2.6.24.

Top of Page