# Svn for the still-existing ports tree, if needed.



## jb_fvwm2 (Nov 17, 2012)

```
mkdir -p /tmp/ports  #.... if one has enough space
svn co svn://svn0.us-west.FreeBSD.org/ports/head /tmp/ports  
# coreutils is installed for the next steps, for the above steps /devel/subversion
cd /tmp/ports
/bin/mv /tmp/ports/.svn /tmp/.svn
gcp -Rvu . /usr/ports                 # note the dot
# later...
/bin/mv /tmp/.svn /tmp/ports/.svn      # for the next svn , ie "svn up /tmp/ports"
# IMHO a large part of that one would want to .sh-ize to avoid typo's which would have 
# unwanted results...
```
Use with caution as I've not time to read it thrice for errors.
Also, extra steps needed if an existing patch is not removed from a port directory by the gcp.
Easier portsnap methods may be available (portsnap.conf...) but as I've already used this way elsewhere there is one less thing to learn here. 
Next step maybe putting the new  /tmp/ports  to a thumbdrive to 
	
	



```
gcp...
rsync...
```
onto other lesser powered, less-disk-space machines.
++++++++++++++++++++++++++++++++++++++++++++++++++++++
Alternately, 

```
mv /usr/ports /usr/ports.old
# svn similarly as above, but more customary..., later...
cd /usr/ports.old
find . -type f -name Makefile -delete
find . -type f -name distinfo -delete
find . -type f -name pkg-descr -delete
find . -type f -name pkg-plist -delete
# todo:  delete work, /files/, etc...
```
Just to complete the thread title a bit more.


----------



## jb_fvwm2 (Nov 18, 2012)

Does anyone know how feasible to set up one's /usr/ports  to use csup  from a server serving files from  one's svn (elsewhere, as above)  directory, as above?  (I assume *no*, but... maybe someone had done it across a LAN connection and so knows a bit more.)


----------

