added scan function that find out what libs are linking to a specific package (taken from wonder https://github.com/wonder)

This commit is contained in:
Benjamin Martinez 2011-04-12 14:59:24 -07:00
commit ebdfc177cc

View file

@ -1,7 +1,14 @@
##some functions
###############
## scan function that find out what libs are linking to a specific package (taken from wonder https://github.com/wonder)
scan () {
pacman -Qlq $1 | xargs file | grep ELF | awk -F: '{print $1}' |
while read elfobj;
do readelf -d $elfobj | sed -n 's|.*NEEDED.*\[\(.*\)\].*|'$elfobj' -- \1|p'
done
}
##--Daemons--##
###############
# starts, stops, restarts and check status of daemons
dstart() {