diff options
author | Yann E. MORIN" <yann.morin.1998@anciens.enib.fr> | 2009-07-27 22:16:07 +0200 |
---|---|---|
committer | Yann E. MORIN" <yann.morin.1998@anciens.enib.fr> | 2009-07-27 22:16:07 +0200 |
commit | e4855367b401011f559f32349e24d6b9d99e763b (patch) | |
tree | 8bc5cd424cbd87d8e5c4df9286edb32d255a0cb8 /scripts/build/libc | |
parent | 795d135b7fc4db7c6ce743d9847af38ae60fab5e (diff) | |
download | crosstool-ng-e4855367b401011f559f32349e24d6b9d99e763b.tar.gz crosstool-ng-e4855367b401011f559f32349e24d6b9d99e763b.tar.bz2 crosstool-ng-e4855367b401011f559f32349e24d6b9d99e763b.zip |
[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.
Diffstat (limited to 'scripts/build/libc')
-rw-r--r-- | scripts/build/libc/eglibc.sh | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/scripts/build/libc/eglibc.sh b/scripts/build/libc/eglibc.sh index dcce76c9..18364c59 100644 --- a/scripts/build/libc/eglibc.sh +++ b/scripts/build/libc/eglibc.sh @@ -41,19 +41,21 @@ do_libc_get() { 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}" |