- Timestamp:
- 04/09/2006 05:17:52 PM (18 years ago)
- Branches:
- experimental
- Children:
- 6753ff7
- Parents:
- d057075
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
extras/do_ica_prep
rd057075 r5bcccc1 11 11 set -e 12 12 13 local CMP_DIR=$1 14 local F L BN 15 local ALL_FILES=/tmp/allfiles.$$ 16 local UNIQUE_FILES=/tmp/uniquefiles.$$ 13 local CMP_DIR=$1 14 local F L BN 17 15 18 19 16 # Run ica_prep if it hasn't been done already 17 if [ ! -f "$CMP_DIR/icaprep" ]; then 20 18 21 22 23 19 echo -n "Removing symbolic links in ${CMP_DIR}... " 20 find $CMP_DIR -type l | xargs rm -f 21 echo "done." 24 22 25 26 27 23 echo -n "Gunzipping \".gz\" files in ${CMP_DIR}... " 24 find $CMP_DIR -name '*.gz' | xargs gunzip 25 echo "done." 28 26 29 30 31 27 #echo -n "Bunzipping \".bz2\" files in ${CMP_DIR}... " 28 #find $CMP_DIR -name '*.bz2' | xargs bunzip2 29 #echo "done." 32 30 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 31 # ar archives contain date & time stamp info that causes us 32 # grief when trying to find differences. Here we perform some 33 # hackery to allow easy diffing. Essentially, replace each 34 # archive with a dir of the same name and extract the object 35 # files from the archive into this dir. Despite their names, 36 # libieee.a & libmcheck.a are not actual ar archives. 37 echo -n "Extracting object files from \".a\" files in ${CMP_DIR}... " 38 L=$(find $CMP_DIR -name '*.a' ! -name 'libieee.a' ! -name 'libmcheck.a') 39 for F in $L; do 40 mv $F ${F}.XX 41 mkdir $F 42 cd $F 43 BN=${F##*/} 44 ar x ../${BN}.XX || { 45 echo -e "\nError: ar archive extraction failed!\n" >&2 46 exit 1 47 } 48 rm -f ../${BN}.XX 49 done 50 echo "done." 53 51 54 55 56 52 echo -n "Stripping (debug) symbols from \".o\" files in ${CMP_DIR}... " 53 find $CMP_DIR -name '*.o' | xargs strip -p -g 2>/dev/null 54 echo "done." 57 55 58 59 60 56 echo -n "Stripping (all) symbols from files OTHER THAN \".o\" files in ${CMP_DIR}... " 57 find $CMP_DIR ! -name '*.o' | xargs strip -p 2>/dev/null || : 58 echo "done." 61 59 62 63 64 65 66 67 68 60 # We're all done 61 echo -en "\nSuccess: ICA preparation for " 62 echo -e "${CMP_DIR} complete.\n" 63 touch $CMP_DIR/icaprep 64 else 65 echo -e "\n$CMP_DIR was already processed\n" 66 fi 69 67
Note:
See TracChangeset
for help on using the changeset viewer.