r2512 - jhalfs/branches/experimental/extras

manuel at linuxfromscratch.org manuel at linuxfromscratch.org
Sun Apr 9 10:17:54 PDT 2006


Author: manuel
Date: 2006-04-09 11:17:52 -0600 (Sun, 09 Apr 2006)
New Revision: 2512

Modified:
   jhalfs/branches/experimental/extras/do_ica_prep
Log:
Clean-up.

Modified: jhalfs/branches/experimental/extras/do_ica_prep
===================================================================
--- jhalfs/branches/experimental/extras/do_ica_prep	2006-04-09 17:09:43 UTC (rev 2511)
+++ jhalfs/branches/experimental/extras/do_ica_prep	2006-04-09 17:17:52 UTC (rev 2512)
@@ -10,60 +10,58 @@
 
 set -e
 
-  local CMP_DIR=$1
-  local F L BN
-  local ALL_FILES=/tmp/allfiles.$$
-  local UNIQUE_FILES=/tmp/uniquefiles.$$
+local CMP_DIR=$1
+local F L BN
 
-  # Run ica_prep if it hasn't been done already
-  if [ ! -f "$CMP_DIR/icaprep" ]; then
+# Run ica_prep if it hasn't been done already
+if [ ! -f "$CMP_DIR/icaprep" ]; then
 
-    echo -n "Removing symbolic links in ${CMP_DIR}... "
-    find $CMP_DIR -type l | xargs rm -f
-    echo "done."
+  echo -n "Removing symbolic links in ${CMP_DIR}... "
+  find $CMP_DIR -type l | xargs rm -f
+  echo "done."
 
-    echo -n "Gunzipping \".gz\" files in ${CMP_DIR}... "
-    find $CMP_DIR -name '*.gz' | xargs gunzip
-    echo "done."
+  echo -n "Gunzipping \".gz\" files in ${CMP_DIR}... "
+  find $CMP_DIR -name '*.gz' | xargs gunzip
+  echo "done."
 
-    #echo -n "Bunzipping \".bz2\" files in ${CMP_DIR}... "
-    #find $CMP_DIR -name '*.bz2' | xargs bunzip2
-    #echo "done."
+  #echo -n "Bunzipping \".bz2\" files in ${CMP_DIR}... "
+  #find $CMP_DIR -name '*.bz2' | xargs bunzip2
+  #echo "done."
 
-    # ar archives contain date & time stamp info that causes us
-    # grief when trying to find differences. Here we perform some
-    # hackery to allow easy diffing. Essentially, replace each
-    # archive with a dir of the same name and extract the object
-    # files from the archive into this dir. Despite their names,
-    # libieee.a & libmcheck.a are not actual ar archives.
-    echo -n "Extracting object files from \".a\" files in ${CMP_DIR}... "
-    L=$(find $CMP_DIR -name '*.a' ! -name 'libieee.a' ! -name 'libmcheck.a')
-    for F in $L; do
-      mv $F ${F}.XX
-      mkdir $F
-      cd $F
-      BN=${F##*/}
-      ar x ../${BN}.XX || {
-      echo -e "\nError: ar archive extraction failed!\n" >&2
-      exit 1
-      }
-      rm -f ../${BN}.XX
-    done
-    echo "done."
+  # ar archives contain date & time stamp info that causes us
+  # grief when trying to find differences. Here we perform some
+  # hackery to allow easy diffing. Essentially, replace each
+  # archive with a dir of the same name and extract the object
+  # files from the archive into this dir. Despite their names,
+  # libieee.a & libmcheck.a are not actual ar archives.
+  echo -n "Extracting object files from \".a\" files in ${CMP_DIR}... "
+  L=$(find $CMP_DIR -name '*.a' ! -name 'libieee.a' ! -name 'libmcheck.a')
+  for F in $L; do
+    mv $F ${F}.XX
+    mkdir $F
+    cd $F
+    BN=${F##*/}
+    ar x ../${BN}.XX || {
+    echo -e "\nError: ar archive extraction failed!\n" >&2
+    exit 1
+    }
+    rm -f ../${BN}.XX
+  done
+  echo "done."
 
-    echo -n "Stripping (debug) symbols from \".o\" files in ${CMP_DIR}... "
-    find $CMP_DIR -name '*.o' | xargs strip -p -g 2>/dev/null
-    echo "done."
+  echo -n "Stripping (debug) symbols from \".o\" files in ${CMP_DIR}... "
+  find $CMP_DIR -name '*.o' | xargs strip -p -g 2>/dev/null
+  echo "done."
 
-    echo -n "Stripping (all) symbols from files OTHER THAN \".o\" files in ${CMP_DIR}... "
-    find $CMP_DIR ! -name '*.o' | xargs strip -p 2>/dev/null || :
-    echo "done."
+  echo -n "Stripping (all) symbols from files OTHER THAN \".o\" files in ${CMP_DIR}... "
+  find $CMP_DIR ! -name '*.o' | xargs strip -p 2>/dev/null || :
+  echo "done."
 
-    # We're all done
-    echo -en "\nSuccess: ICA preparation for "
-    echo -e "${CMP_DIR} complete.\n"
-    touch $CMP_DIR/icaprep
-  else
-   echo -e "\n$CMP_DIR was already processed\n"
-  fi
+  # We're all done
+  echo -en "\nSuccess: ICA preparation for "
+  echo -e "${CMP_DIR} complete.\n"
+  touch $CMP_DIR/icaprep
+else
+  echo -e "\n$CMP_DIR was already processed\n"
+fi
 




More information about the alfs-log mailing list