Skip to content

Instantly share code, notes, and snippets.

@eusonlito
Last active Dec 12, 2015
Embed
What would you like to do?
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