Skip to content

Instantly share code, notes, and snippets.

@jcleveley-zz
Created February 25, 2010 13:48
Show Gist options
  • Save jcleveley-zz/314547 to your computer and use it in GitHub Desktop.
Save jcleveley-zz/314547 to your computer and use it in GitHub Desktop.
#!/bin/bash
echo ""
echo "Here's what we're going to do:"
echo " "
echo "Add the following files"
echo "-----------------------"
svn status | awk '/^\?/ {print $2}'
echo " "
echo "Remove the following files"
echo "--------------------------"
svn status | awk '/^!/ {print $2}'
echo " "
echo "Check in the following modified files"
echo "-------------------------------------"
svn status | awk '/^M/ {print $2}'
echo " "
echo "Proceed with commit? [yn]"
read answer
if [ "$answer" = "y" ]
then
echo " "
echo "Adding the following files"
svn status | awk '/^\?/ {print $2}' | xargs svn add
echo " "
echo "Removing the following files"
svn status | awk '/^!/ {print $2}' | xargs svn remove
echo " "
echo "Committing changes to repository"
svn commit
else
echo " "
echo "Commit cancelled"
fi
echo " "
echo "Want to check for updates? [yn]"
read answer
if [ "$answer" = "y" ]
then
svn update
else
echo " "
echo "Update cancelled"
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment