Created
August 28, 2013 18:37
-
-
Save lite/6369622 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!env /bin/bash | |
| svn_clean(){ | |
| echo remove .svn in $1 | |
| find $1 -type d -name .svn -print0 | xargs -0 rm -rf | |
| } | |
| svn_submit(){ | |
| s_cnt=`find $1 -type f |wc -l` | |
| echo $1 have $s_cnt files | |
| if [ $(($s_cnt/1)) -lt 2000 ]; then | |
| svn add $1 --force | |
| svn commit -m "add $1 force" | |
| else | |
| svn add $1 --depth=files --force | |
| svn commit -m "add $1" | |
| for file in `ls $1` | |
| do | |
| path=$1/${file} | |
| if [ -d ${path} ]; then | |
| svn_submit ${path} | |
| fi | |
| done | |
| fi | |
| } | |
| #[~/dth/git.dev/dth-repo/cdn/100642705]$ bash ../ci.sh files/assets_18 | |
| ACTION="$1" | |
| case $ACTION in | |
| -c) svn_clean $2;; | |
| -s) svn_submit $2;; | |
| *) echo "-c clean .svn folder, -s need server.";; | |
| esac |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment