# HG changeset patch # User "Yann E. MORIN" # Date 1248725767 -7200 # Node ID eded630226515c17392ed30dc61f5858f40b9846 # Parent 1626414b16622ef9cf27e41eadf9429e942195dd [libc-eglibc] Rewrite part of the code Rewrite part of the code to better match the rest. Most notably, rewrite handling of: if [ ... ] && [ ... ] to: if [ ... -a ... ] This has the positive side effect of calling "[" only once, although "[" is probably a shell built-in. diff -r 1626414b1662 -r eded63022651 scripts/build/libc/eglibc.sh --- a/scripts/build/libc/eglibc.sh Mon Jul 27 22:14:08 2009 +0200 +++ b/scripts/build/libc/eglibc.sh Mon Jul 27 22:16:07 2009 +0200 @@ -41,19 +41,21 @@ eglibc_ports="${CT_LIBC}-ports-${CT_LIBC_VERSION}.tar.bz2" # Check if every tarballs are already present - if [ -f "${CT_TARBALLS_DIR}/${eglibc}" ] && \ - [ -f "${CT_TARBALLS_DIR}/${eglibc_linuxthreads}" ] && \ - [ -f "${CT_TARBALLS_DIR}/${eglibc_localedef}" ] && \ - [ -f "${CT_TARBALLS_DIR}/${eglibc_ports}" ]; then + if [ -f "${CT_TARBALLS_DIR}/${eglibc}" \ + -a -f "${CT_TARBALLS_DIR}/${eglibc_linuxthreads}" \ + -a -f "${CT_TARBALLS_DIR}/${eglibc_localedef}" \ + -a -f "${CT_TARBALLS_DIR}/${eglibc_ports}" \ + ]; then CT_DoLog DEBUG "Already have 'eglibc-${CT_LIBC_VERSION}'" return 0 fi - if [ -f "${CT_LOCAL_TARBALLS_DIR}/${eglibc}" ] && \ - [ -f "${CT_LOCAL_TARBALLS_DIR}/${eglibc_linuxthreads}" ] && \ - [ -f "${CT_LOCAL_TARBALLS_DIR}/${eglibc_localedef}" ] && \ - [ -f "${CT_LOCAL_TARBALLS_DIR}/${eglibc_ports}" ] && \ - [ "${CT_FORCE_DOWNLOAD}" != "y" ]; then + if [ -f "${CT_LOCAL_TARBALLS_DIR}/${eglibc}" \ + -a -f "${CT_LOCAL_TARBALLS_DIR}/${eglibc_linuxthreads}" \ + -a -f "${CT_LOCAL_TARBALLS_DIR}/${eglibc_localedef}" \ + -a -f "${CT_LOCAL_TARBALLS_DIR}/${eglibc_ports}" \ + "${CT_FORCE_DOWNLOAD}" != "y" \ + ]; then CT_DoLog DEBUG "Got 'eglibc-${CT_LIBC_VERSION}' from local storage" for file in ${eglibc} ${eglibc_linuxthreads} ${eglibc_localedef} ${eglibc_ports}; do CT_DoExecLog ALL ln -s "${CT_LOCAL_TARBALLS_DIR}/${file}" "${CT_TARBALLS_DIR}/${file}"