Skip to content

Instantly share code, notes, and snippets.

@russleyshaw
Created September 8, 2013 05:37
Show Gist options
  • Save russleyshaw/6482128 to your computer and use it in GitHub Desktop.
Save russleyshaw/6482128 to your computer and use it in GitHub Desktop.
A script made by @cherez. This little bit of Unix magic finds what Boost dependencies will be used and copies only the necessary bits into the current directory. It assumes there is a folder called "boost" in the parent directory.
gcc -M -I .. main.cpp | sed 's/ /\n/g' | grep boost | sed 's/\\$//g' | sort | uniq | (while read i;do x=$(echo $i | sed 's|^\.\./|./|g');mkdir -p $(dirname $x);cp $i $x;done )
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment