Last active
August 29, 2015 14:02
-
-
Save azat/bbc65562d1808499429d to your computer and use it in GitHub Desktop.
This file contains 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/env bash | |
echo "Stage 1: modified" | |
git st -s | grep '^ M' | fgrep .kde | awk '{print $NF}' | \ | |
xargs -r -i sh -c 'mv {} /tmp/ && echo {} >> .gitignore' | |
git ci .kde/share/config .gitignore -m 'ignore: more dynamic configs (modified)' | |
git show .gitignore | grep ^+.kde | awk -F/ '{print $NF}' | xargs -r -i mv /tmp/{} .kde/share/config/ | |
echo "Stage 2: untracked" | |
git st -s -uall | grep '^??' | awk '{print $NF}' | xargs -r -i sh -c 'echo {} >> .gitignore' | |
git ci .kde/share/config .gitignore -m 'ignore: more dynamic configs (untracked)' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment