Created
January 6, 2018 18:23
-
-
Save TheStrix/d7890a21b9736623a6f82e8185776d80 to your computer and use it in GitHub Desktop.
Script to run findmissing for all the libs (.so) and */bin/*
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
OUT_TXT=$HOME/tmp/missing.txt | |
TMPDIR=$(mktemp -d) | |
if [[ -f ../00_project_files/all_files.txt ]]; then | |
SYSTEM_FILES_PATH=$(readlink -f ../00_project_files/all_files.txt) | |
elif [[ -f 00_project_files/all_files.txt ]]; then | |
SYSTEM_FILES_PATH=$(readlink -f 00_project_files/all_files.txt) | |
elif [[ -f all_files.txt ]]; then | |
SYSTEM_FILES_PATH=$(readlink -f all_files.txt) | |
else | |
echo -e "${lightred}Couldn't find all_files.txt${nc}" | |
fi | |
cp $SYSTEM_FILES_PATH $TMPDIR/tmp.txt | |
sed "s|/system/||g" $TMPDIR/tmp.txt > $TMPDIR/all.txt | |
while read l; do | |
if [[ "${l##*.}" == "so" ]]; then | |
findmissing --findallreference --plain $l >> $OUT_TXT | |
elif echo "$l" | grep -q 'bin/'; then | |
if echo "$l" | grep -qx 'vendor/bin/hw\|bin/hw'; then | |
continue | |
elif echo "$l" | grep -q 'xbin/'; then | |
continue | |
else | |
findmissing --findallreference --plain $l >> $OUT_TXT | |
fi | |
fi | |
done <$TMPDIR/all.txt | |
sort -u $OUT_TXT > $TMPDIR/tmp && mv $TMPDIR/tmp $OUT_TXT | |
rm -rf $TMPDIR |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment