You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
12 lines
809 B
12 lines
809 B
#!/bin/bash
|
|
|
|
mkdir -p ./bins/x86 ./bins/64 ./objs/x86 ./objs/64 ./libs/x86 ./libs/64
|
|
|
|
find . -maxdepth 1 -type f -exec file {} \; | grep 'ELF 32-bit' | grep 'relocatable' | cut -d: -f1| xargs -I{} mv {} ./objs/x86
|
|
find . -maxdepth 1 -type f -exec file {} \; | grep 'ELF 64-bit' | grep 'relocatable' | cut -d: -f1 | xargs -I{} mv {} ./objs/64
|
|
|
|
find . -maxdepth 1 -type f -exec file {} \; | grep 'ELF 32-bit' | grep 'shared' | cut -d: -f1 | xargs -I{} mv {} ./libs/x86
|
|
find . -maxdepth 1 -type f -exec file {} \; | grep 'ELF 64-bit' | grep 'shared' | cut -d: -f1 | xargs -I{} mv {} ./libs/64
|
|
|
|
find . -maxdepth 1 -type f -exec file {} \; | grep 'ELF 32-bit' | cut -d: -f1 | xargs -I{} mv {} ./bins/x86
|
|
find . -maxdepth 1 -type f -exec file {} \; | grep 'ELF 64-bit' | cut -d: -f1 | xargs -I{} mv {} ./bins/64
|
|
|