ah, your correct, you should add the part with the “file repo” … i took you script and adjusted it a bit. (see below)
The “why” i changed it, now its very easy to adapt this to a webserver repo and when you use different archtectures, you cant mix the amd and i386 files in one repo. If you want that you need a more advanced setup.
to change this to webserver repo: (example)
deb [trusted=yes] file:/home/kopano/deb/core amd64/
deb [trusted=yes] http:// hostname.or.IP/ amd64/
This is my webserver document root: /home/kopano/deb/core
#!/bin/bash
ARCH=$(arch)
if [ ${arch} = x86_64 ]
then
ARCH=amd64
[ ! -d amd64 ]
mkdir amd64
mv *.deb amd64
elif [ ${arch} = i386 ]||[ ${arch} = i686 ]
then
ARCH=i386
[ ! -d i386 ]
mkdir i386
mv *.deb i386
fi
read -p "Create a local apt repo from the current dir? (y/n) " RESP
if [ "$RESP" = "y" ]; then
apt-ftparchive packages $ARCH/ | gzip -9c > $ARCH/Packages.gz
fi
echo "To use this repo we will added the following file: "
echo " /etc/apt/sources.list.d/kopano-community.list"
echo "Which containing the line: "
echo "deb [trusted=yes] file:$(pwd) $ARCH/"
echo "deb [trusted=yes] file:$(pwd) $ARCH/" > /etc/apt/sources.list.d/kopano-community.list
echo
echo "you can call apt-get the following way now:"
echo "apt-get install kopano-server-packages"
Greetz,
Louis