--- cddbd-1.5.2.old/config.sh +++ cddbd-1.5.2/config.sh @@ -37,47 +37,6 @@ # Utility functions # -getyn() -{ - if [ -z "$YNDEF" ] - then - YNDEF=y - fi - - while : - do - $ECHO "$*? [${YNDEF}] \c" - read ANS - if [ -n "$ANS" ] - then - case $ANS in - [yY]) - RET=0 - break - ;; - [nN]) - RET=1 - break - ;; - *) - $ECHO "Please answer y or n" - ;; - esac - else - if [ $YNDEF = y ] - then - RET=0 - else - RET=1 - fi - break - fi - done - - YNDEF= - return $RET -} - doexit() { if [ $1 -eq 0 ] @@ -151,32 +108,14 @@ if [ -z "$BASEDIR" ] then - BASEDIR=/usr/local + BASEDIR=__META_PREFIX__ else BASEDIR=`echo $BASEDIR | sed 's/\/\//\//g'` fi ACCESS=${BASEDIR}/cddbd - -while : -do - if getstr "\nEnter the path to the cddbd access file dir\n[${ACCESS}]" - then - if [ -d `dirname "$ANS"` ] - then - ACCESS=$ANS - break - else - $ECHO "Error: $ANS does not exist." - fi - else - break - fi -done - echo - # Create the target files. umask $UMASK @@ -206,22 +145,6 @@ secusers=0 -while : -do - if getstr "Secure user:" - then - if [ $ANS = "" ] - then - break - else - $ECHO " \"$ANS\"," >> secure.c - secusers=`expr $secusers + 1` - fi - else - break - fi -done - cat >> secure.c << __EOF__ 0 }; @@ -239,35 +162,9 @@ echo "#define __CONFIGURABLES_H__" >> ${CONFIGHEADER} echo "" >> ${CONFIGHEADER} -YNDEF=n -getyn "\nDo you want to use Windows format of the DB" -if [ $? -eq 0 ] -then - echo "#define DB_WINDOWS_FORMAT" >> ${CONFIGHEADER} - YNDEF=y - getyn "\nDo you want to support DB files containing range of discid's start byte\n\ -- e.g. 01to33 (this is the standard format; otherwise there must be a file for\n\ -each discid's start byte - e.g. 01to01 (a little bit faster))" - if [ $? -eq 0 ] - then - echo "#define DB_WINDOWS_FORMAT_USE_RANGES" >> ${CONFIGHEADER} - else - echo "#undef DB_WINDOWS_FORMAT_USE_RANGES" >> ${CONFIGHEADER} - fi -else - echo "#undef DB_WINDOWS_FORMAT" >> ${CONFIGHEADER} - echo "#undef DB_WINDOWS_FORMAT_USE_RANGES" >> ${CONFIGHEADER} -fi - -YNDEF=n -getyn "\nDo you want to disable peer address resolution (faster under Cygwin\n\ -when there is no DNS (no internet access))" -if [ $? -eq 0 ] -then - echo "#define DONT_RESOLVE_ADDRESS" >> ${CONFIGHEADER} -else - echo "#undef DONT_RESOLVE_ADDRESS" >> ${CONFIGHEADER} -fi +echo "#undef DB_WINDOWS_FORMAT" >> ${CONFIGHEADER} +echo "#undef DB_WINDOWS_FORMAT_USE_RANGES" >> ${CONFIGHEADER} +echo "#undef DONT_RESOLVE_ADDRESS" >> ${CONFIGHEADER} echo "" >> ${CONFIGHEADER} echo "#endif /* __CONFIGURABLES_H__ */" >> ${CONFIGHEADER}