Tiny Core Extensions > TCE Tips & Tricks
dep generator
(1/1)
CardealRusso:
Hopefully this will make less typos than manual edits and save some time.
--- Code: ---optionalDir="/etc/sysconfig/tcedir/optional"
result=$(find . -exec ldd {} \; 2>/dev/null | awk '/\/usr\/local\/lib/ {print $3}' | xargs ls -lah | awk '{print $11}' | awk -F'/' '{print $4 ".tcz"}' | sort | uniq)
while [ "$result" != "$resultCopy" ]; do
resultCopy=$result
for item in $result; do
list_file="${optionalDir}/${item}.dep"
if [ -e "$list_file" ]; then
while read -r line; do
if [ -n "$line" ]; then
result=$(echo "$result" | tr ' ' '\n' | grep -v "$line")
fi
done < "$list_file"
fi
done
done
echo $result | tr ' ' '\n'
--- End code ---
It is expected to run this script in the directory containing binaries that already have all dependencies loaded.
It also won't work with copy2fs extensions.
Edit: "-type f" removed from second line
patrikg:
Maybe one could include this into the submit check script.
I like the result one liner. :), the power of unix with piping.
CardealRusso:
--- Quote from: patrikg on November 29, 2023, 12:19:11 AM ---Maybe one could include this into the submit check script.
--- End quote ---
Unfortunately this still requires manual editing. And -dev files don't work. It's a "little help" than doing all the dirty work.
--- Quote from: bmarkus on January 10, 2010, 05:10:02 AM ---Also, there are dependencies can't be detected on this way, like icon themes, etc. So for sure it is very useful, but can't be used exclusively but a good tool to detect missing libs.
--- End quote ---
Navigation
[0] Message Index
Go to full version