Skip to content

Instantly share code, notes, and snippets.

@xylifyx2
Last active August 29, 2015 14:18
Show Gist options
  • Save xylifyx2/9818228ac4412add802b to your computer and use it in GitHub Desktop.
Save xylifyx2/9818228ac4412add802b to your computer and use it in GitHub Desktop.
#!/bin/bash
echo "Starting update: `date`"
rm -f svnupdate.* stderr.txt stdout.txt
ls -d1 */.svn/.. 2>/dev/null | split -l40 - svnupdate.
echo "`cat svnupdate.* 2>/dev/null | wc -l` projects updated in `ls -1 svnupdate.* 2>/dev/null | wc -l` parallel processes"
for f in svnupdate.*
do svn update `cat $f` 2>>stderr.txt 1>>stdout.txt &
done 2>/dev/null
wait
if [ -s stderr.txt ]; then
echo "Update Failed: `date`"
cat stderr.txt
else
echo "Update succeeded: `date`"
echo "remember to refresh projects in Eclipse"
fi
@xylifyx2
Copy link
Author

xylifyx2 commented Apr 7, 2015

Update to hide glob errors in directories with no svn projects

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment