Skip to content

Instantly share code, notes, and snippets.

@sizeofvoid
Created October 7, 2022 19:42
Show Gist options
  • Save sizeofvoid/e00fad2c3ae7f8365728a43faac8dd8c to your computer and use it in GitHub Desktop.
Save sizeofvoid/e00fad2c3ae7f8365728a43faac8dd8c to your computer and use it in GitHub Desktop.
ports_find_missing_libs and ports_find_missing_lib_ports
ports_find_missing_libs() {
make port-lib-depends-check | \
while read LINE
do
if [[ $LINE == "Missing lib: "* ]]; then
LIB_NAME=$(echo $LINE | awk '{print $3}')
LIB_NAME=${LIB_NAME%.*}
rg ${LIB_NAME} ~/wip-ports | rg SHARED_LIBS | \
while read SHARED_LIB
do
SLIB=${SHARED_LIB%/Makefile*}
SLIB=${SLIB#*/home/rsadowski/wip-ports/}
echo "${LIB_NAME}: $SLIB"
done
fi
done
}
ports_find_missing_lib_ports() {
make port-lib-depends-check | \
while read LINE
do
if [[ $LINE == "Missing lib: "* ]]; then
LIB_NAME=$(echo $LINE | awk '{print $3}')
LIB_NAME=${LIB_NAME%.*}
rg ${LIB_NAME} ~/wip-ports | rg SHARED_LIBS | \
while read SHARED_LIB
do
SLIB=${SHARED_LIB%/Makefile*}
SLIB=${SLIB#*/home/rsadowski/wip-ports/}
echo $SLIB
done
fi
done
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment