From 2656d14aaf55a2927be680a1ed2df31ee0a96c8c Mon Sep 17 00:00:00 2001 From: Juan RP Date: Mon, 15 Dec 2008 09:16:55 +0100 Subject: [PATCH] xbps.sh: remove duplicated check_config_vars func! --HG-- extra : convert_revision : bf5b9d588ad658491eab9110a921b656a66b3fb2 --- xbps.sh | 49 ------------------------------------------------- 1 file changed, 49 deletions(-) diff --git a/xbps.sh b/xbps.sh index 5ef71db338c..1ca49dfe67d 100755 --- a/xbps.sh +++ b/xbps.sh @@ -163,55 +163,6 @@ check_config_vars() fi } -# -# Checks that all required variables specified in the configuration -# file are properly working. -# -check_config_vars() -{ - local cffound= - local f= - - if [ -z "$config_file_specified" ]; then - config_file_paths="$XBPS_CONFIG_FILE ./xbps.conf" - for f in $config_file_paths; do - [ -f $f ] && XBPS_CONFIG_FILE=$f && \ - cffound=yes && break - done - [ -z "$cffound" ] && msg_error "cannot find a config file" - fi - - run_file ${XBPS_CONFIG_FILE} - XBPS_CONFIG_FILE=$path_fixed - - if [ ! -f "$XBPS_CONFIG_FILE" ]; then - msg_error "cannot find configuration file: $XBPS_CONFIG_FILE" - fi - - local XBPS_VARS="XBPS_MASTERDIR XBPS_DESTDIR XBPS_BUILDDIR \ - XBPS_SRCDISTDIR" - - for f in ${XBPS_VARS}; do - eval val="\$$f" - [ -z "$val" ] && msg_error "'$f' not set in configuration file" - - if [ ! -d "$val" ]; then - mkdir "$val" - [ $? -ne 0 ] && msg_error "couldn't create '$f' directory" - fi - done - - if [ "$xbps_machine" = "x86_64" ]; then - [ ! -d $XBPS_MASTERDIR/lib ] && mkdir -p $XBPS_MASTERDIR/lib - [ ! -h $XBPS_MASTERDIR/lib64 ] && \ - cd $XBPS_MASTERDIR && ln -s lib lib64 - [ ! -d $XBPS_MASTERDIR/usr/lib ] && \ - mkdir -p $XBPS_MASTERDIR/usr/lib - [ ! -h $XBPS_MASTERDIR/usr/lib64 ] && \ - cd $XBPS_MASTERDIR/usr && ln -s lib lib64 - fi -} - # # main() #