bpakk: Change `-w` option to `-s`/`--size`
[sunny256-utils.git] / svnclean
blobd6b6fab594ddff0de541c8a028694419db876ad2
1 #!/usr/bin/env bash
3 #=======================================================================
4 # svnclean
5 # File ID: 0f6706d6-f744-11dd-a790-000475e441b9
6 # Clean up a subversion working copy
7 # License: GNU General Public License version 2 or later.
8 #=======================================================================
10 if [ ! -d .svn/. ]; then
11 echo "Current directory is not a svn working copy, aborting." >&2
12 exit 1
15 echo Warning, this command will delete all files which is not versioned with >&2
16 echo Subversion. The working copy will be reset. >&2
17 echo -n "Press 'y' + Enter to continue..." >&2
18 read choice
19 if [ "$choice" = "y" ]; then
20 echo ==== svn cleanup...
21 svn cleanup .
22 echo ==== svn revert...
23 svn revert -R .
24 # echo ==== Remove unknown files...
25 # svn stat --no-ignore | grep -E '^[\?I]' | cut -c 9- | \
26 # perl -pe 's/^/\.\//' | tr '\n' '\0' | xargs -0 -r rm -rfv
27 echo ==== svn stat --no-ignore...
28 svn stat --no-ignore