From: Serge L. <fi...@in...> - 2005-11-01 11:29:43
|
Dear Bruce, Monday, October 31, 2005, 8:08:00 PM, you wrote: > If you want any help, please explain more about what it does. > (examples are good :) In compliance with syntax offered by Heiko I try to do the following: 1. "take a bite" the name of module and its dependencies (in form of condition for test command ) from the line. ($f - name, $s - condition) 2. if $f is equivalent of $s then it means that no dependencies for this module, otherwise we should check condition: if $s is true, then use this module. Well, I have a trouble in the condition checking. There is true (if [ "$s" ]; then ) or false ( if [ $s ]; then ) _always_. Really I've done a lot of modifications of this simple line but unsuccessful. There is my concept in bash (not working yet) -----------------8<-------------------- #!/bin/sh export CONFIG_MYSQL_CLIENT=y export CONFIG_POSTGRESQL_CLIENT=y while read line do f=`echo $line | cut -d' ' -f1 ` s=`echo $line | cut -d' ' -f2- ` if [ "$f" = "$s" ]; then echo $f else if [ "$s" ]; then echo $f fi fi done < ./perl-ext.2 exit 0 -----------------8<-------------------- where /perl-ext.2 is: -----------------8<-------------------- Carp-Clan Bit-Vector-6.4 Convert-ASN1 DBI DBD-mysql "$CONFIG_MYSQL_CLIENT" = "y" DBI-DBD-Pg "$CONFIG_POSTGRESQL_CLIENT" = "y" DBI-DBD-mysql "$CONFIG_MYSQL_CLIENT" = "y" DB_File Date-Calc libwww-perl perl-ldap "$CONFIG_OPENLDAPLIB" = "y" Crypt-SmbHash IP-Country -----------------8<-------------------- -- Best regards, Serge mailto:fi...@in... |