Last active
August 9, 2023 09:16
-
-
Save surajRathi/b49474efd96d8bab70eb3b5ac81cb90f to your computer and use it in GitHub Desktop.
Extract dependencies from ROS package launch files
This file contains hidden or 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
#!/usr/bin/zsh | |
cat **/**.launch | grep -oE '\$\(find [^)]*\)' | cut -d ' ' -f 2 | cut -d ')' -f 1 | sort | uniq | |
cat **/**.launch | grep -oE 'pkg="[^" ]*?"' | cut -d '"' -f 2 | sort | uniq | |
# (cat **/**.launch | grep -oE '\$\(find [^)]*\)' | cut -d ' ' -f 2 | cut -d ')' -f 1 | sort | uniq; cat **/**.launch | grep -oE 'pkg="[^" ]*?"' | cut -d '"' -f 2 | sort | uniq) | sort | uniq |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
To roughly extract packages from includes