# Install software do not use Internet.



## valsorym (Sep 24, 2011)

Hi all, I have a question. I have one PC, it should not connect to Internet. I want to install there FreeBSD 8.2. We call it <B> computer. My second PC (we call it <A> computer) has Internet connect. I installed FreeBSD on <A> and <B> computers. On <A> computer, I have installed the necessary software to me, used port collections. After I create folder:

```
# mkdir -p ~/packages
```

And create local repository.

```
# cd ~/packages/
# pkg_info -Ix <pkg_name>
```
See the full name of the package.

```
# pkg_create -R -b <pkg_full_name>
```

After I copy ~/packages to <B> computer and install software.

But, I have 50 software. And I should 50 use: pkg_info and pkg_create. pkg_create runs from 3 seconds to 15 minutes. All this time I have to sit at the <A> computer.


How to automate the process of creating a local repository? Perhaps there is another way?


----------



## wblock@ (Sep 24, 2011)

Write a shell script to loop through all the installed packages and create a package for each.

untested messy sorta-pseudo-code

```
#!/bin/sh

repo="/home/somebody/packages"

cd $repo
for pkg in $( pkg_info | cut -d' ' -f1 ); do
  pkg_create -b $pkg  # note non-use of -R
done
```


----------



## valsorym (Sep 24, 2011)

Thank you wblock@!
Should work!


----------

