CVSup Progress Bar

Hi,

currently I'm working on a bash script where I make use of cvsup-without-gui. Synchronizing ports and sources takes about 25 minutes. It would be nice to give the user a little progress bar instead of a verbosity of -L 2 or a stucking shell (-L 0) but unfortunately cvsup doesn't offer such a nice feature.

So now my goal is to give the user a progress bar. I was thinking of checking the total size of the repository paths cvsup will sync and then use /usr/bin/du to let the progress bar grow. Obviously this will only work for very first cvsup download - but that's exctly what I need here ;)

Is there an better way to get that done? If not then what would be the easiest way to get the size of the repository or better said the folder I want to sync?

Thanks
 
phoenix said:
Can't help with the progress bar
Uncool ;/ but is there a way to get the size of a specific file/folder tree?

phoenix said:
..., but you should consider using csup(1) instead, as that's already included in the base install. No need to install the net/cvsup and related ports.

Good hint - I was already wondering why they don't descripe this tool in the FreeBSD handbook instead of cvsup withou gui ;(

Basically I do the following or better said that's what I need to get done by csup then:

Code:
echo "
*default tag=.
*default host=cvsup.de.FreeBSD.org
*default prefix=/usr
*default base=/var/db
*default release=cvs
*default delete use-rel-suffix
*default compress

src-base release=cvs
src-sys release=cvs

ports-all
" > /root/Scripts/CVS-supfile


Code:
mkdir -p -m 0755 /var/db/sup

echo "#==============#
# CVSUP Refuse #
#==============#

doc/bn_*
doc/da_*
#doc/de_*
doc/el_*
doc/es_*
doc/fr_*
doc/hu_*
doc/it_*
doc/ja_*
doc_mn_*
doc/nl_*
doc/no_*
doc/pl_*
doc/pt_*
doc/ru_*
doc/sr_*
doc/tr_*
doc/zh_*

#ports/accessibility
#ports/arabic
#ports/astro
" > /var/db/sup/refuse
chmod -R 0755 /var/db/sup


Code:
cvsup -z -g -L 0 /root/Scripts/CVS-supfile
cd /usr/ports && make fetchindex


I tried the following alternative commands now and it seems to work:
Code:
csup -z -L 2 /root/Scripts/CVS-supfile
cd /usr/ports && make fetchindex

... but is this right, because I'm not to sure whether it makes actually use of /var/db/sup/refuse?!


Thanks
 
Back
Top