Guest User

Untitled

a guest
Apr 21st, 2018
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.11 KB | None | 0 0
  1. #!/bin/sh
  2.  
  3. # ###################################################################################
  4. # Shell script to transform the .gitignore config to be subversion compatible and
  5. # apply it to the subversion global-ignores configuration.
  6. #
  7. # Author: Filip De Vos
  8. # Last updated: Jan 26 2010
  9. #
  10. # License: WTFPL
  11. #
  12. # Compatibility: Tested on Windows 7 from the msysgit bash shell.
  13. #
  14. # to use this script just call it from the same folder as your .gitignore file
  15. # you might have to make it executable with chmod +x apply_to_svn_config.sh
  16. #
  17. # Notes: This script is very naive because I totally stink at bash scripting.
  18. #
  19. # ###################################################################################
  20.  
  21. sed "s%^.*global-ignores =.*%global-ignores = .git `cat .gitignore | sed -e "/^#/d" | tr '\r\n' ' '`%g" ~/.subversion/config > updated_config
  22. cp updated_config ~/.subversion/config
  23. sed "s%^.*global-ignores =.*%global-ignores = .git `cat .gitignore | sed -e "/^#/d" | tr '\r\n' ' '`%g" ~/AppData/Roaming/Subversion/config > updated_config
  24. cp updated_config ~/AppData/Roaming/Subversion/config
  25. rm updated_config
Add Comment
Please, Sign In to add comment