From fe7aed183fa9f880d4f94966c483168c10d47a6a Mon Sep 17 00:00:00 2001 From: "Ryan C. Gordon" Date: Sun, 4 Oct 2009 16:22:32 -0400 Subject: [PATCH] Probably shouldn't do this on a root filesystem. :) --- misc/merge.sh | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/misc/merge.sh b/misc/merge.sh index 183c2a8..20acab6 100755 --- a/misc/merge.sh +++ b/misc/merge.sh @@ -16,23 +16,23 @@ cmake -DCMAKE_BUILD_TYPE=Release ../.. make -j2 gcc -o iself -s -O3 ../iself.c -#time for feh in bin boot etc lib opt sbin usr var ; do find /$feh -type f -exec ./iself {} \; ; done |perl -w -pi -e 's/\A\///;' |grep -v "usr/lib32/" |sort |uniq > ./binaries-64 +#time for feh in bin boot etc lib opt sbin usr var ; do find /x86_64/$feh -type f -exec ./iself {} \; ; done |perl -w -pi -e 's/\A\x86_64\///;' |grep -v "usr/lib32/" |sort |uniq > ./binaries-64 time for feh in bin boot etc lib opt sbin usr var ; do find /x86/$feh -type f -exec ./iself {} \; ; done |perl -w -pi -e 's/\A\/x86\///;' |grep -v "usr/lib64" |sort |uniq > ./binaries-32 for feh in `cat binaries-32` ; do - mkdir -p --mode=0755 `dirname "/$feh"` - if [ -f "/$feh" ]; then + mkdir -p --mode=0755 `dirname "/x86_64/$feh"` + if [ -f "/x86_64/$feh" ]; then FATELF=0 - ./fatelf-validate "/$feh" && ISFATELF=1 + ./fatelf-validate "/x86_64/$feh" && ISFATELF=1 if [ "x$ISFATELF" = "x1" ]; then - ./fatelf-replace tmp-fatelf "/$feh" "/x86/$feh" + ./fatelf-replace tmp-fatelf "/x86_64/$feh" "/x86/$feh" else - ./fatelf-glue tmp-fatelf "/$feh" "/x86/$feh" + ./fatelf-glue tmp-fatelf "/x86_64/$feh" "/x86/$feh" fi - chmod --reference="/$feh" tmp-fatelf - mv tmp-fatelf "/$feh" + chmod --reference="/x86_64/$feh" tmp-fatelf + mv tmp-fatelf "/x86_64/$feh" else - cp -a "/x86/$feh" "/$feh" + cp -a "/x86/$feh" "/x86_64/$feh" fi done