Skip to content

Instantly share code, notes, and snippets.

@martinribelotta
Last active August 29, 2017 21:31
Show Gist options
  • Save martinribelotta/230281fe05703ec38f57b1038c4e27d5 to your computer and use it in GitHub Desktop.
Save martinribelotta/230281fe05703ec38f57b1038c4e27d5 to your computer and use it in GitHub Desktop.
MSYS2 bundled generation
PACKAGES="coreutils git bash"
FILTERED="'/usr/share' perl terminfo"
_F_CMD=$(for f in $FILTERED; do echo -n "grep -v -F $f | "; done)
F_CMD=${_F_CMD::-2}
D_CMD=$(pacman -Q -l $(for p in $PACKAGES; do pactree.exe -lu $p; done)|cut -d ' ' -f 2|sort -u | eval $F_CMD )
for f in $D_CMD
do
test -f $f && cp -v $f tmp$f;
test -d $f && mkdir -vp tmp$f
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment