Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tomasfejfar/e3607569e6a38424e7cf2d9d56187815 to your computer and use it in GitHub Desktop.
Save tomasfejfar/e3607569e6a38424e7cf2d9d56187815 to your computer and use it in GitHub Desktop.
Minionless gitfs bug workaround that copies commented out formulas from minion settings to /srv/salt for local usage
#! /bin/bash
grep http /etc/salt/minion.d/settings.conf | cut -c6- | xargs -n1 git clone
find /home/tomas/ -type d -name "*formula" -exec git --git-dir={}/.git --work-tree={} pull origin master \;
find /home/tomas/ -type d -name "*formula" -exec sh -c "git --git-dir={}/.git --work-tree={} archive master | tar -x --strip-components 0 -C /srv/salt/" \;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment