Skip to content

Instantly share code, notes, and snippets.

@eusonlito
Last active December 12, 2015 08:48
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 eusonlito/4746246 to your computer and use it in GitHub Desktop.
Save eusonlito/4746246 to your computer and use it in GitHub Desktop.
Add all new files (no directories) to the next svn commit
#! /bin/sh
add=`svn status |\
grep ? |\
grep '\.[a-z]\{2,4\}$' |\
grep -v '\.sql$' |\
grep -v '\.sh$' |\
grep -v '\.gz' |\
grep -v '\.tar' |\
grep -v '\.swp' |\
grep -v 'localhost' |\
grep -v 'config/default' |\
grep -v 'logs/' |\
grep -v 'uploads/' |\
awk -F' ' '{print $2}'`
if [ "$add" != '' ]; then
svn add $add
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment