]> ruderich.org/simon Gitweb - config/dotfiles.git/blobdiff - debian/bin/init-reprepro.sh
use set -eu
[config/dotfiles.git] / debian / bin / init-reprepro.sh
index f16a69b979140739e6e7e4ab491c1089da05d1ab..4014dc4b3a708b2efc6f3c1a8771ed6e622b7b2c 100755 (executable)
@@ -16,8 +16,8 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
-set -e
 
+set -eu
 
 sources=/etc/apt/sources.list
 repo=/root/apt
@@ -63,7 +63,7 @@ if test ! -d "$repo"; then
     mkdir -p "$repo/conf"
     mkdir -p "$repo/morgue"
 
-    arch=`dpkg --print-architecture`
+    arch="`dpkg --print-architecture` `dpkg --print-foreign-architectures`"
     cat >"$repo/conf/distributions" <<EOF
 Codename: $codename
 Components: main
@@ -78,7 +78,7 @@ EOF
     # reprepro is not installed, it's not necessary for a correct
     # installation.
     echo 'Initializing repository, errors are ignored.' >&2
-    ( cd "$repo" && reprepro check ) || true
+    ( cd "$repo" && reprepro export ) || true
 
     # Does nothing if the same key is imported multiple times.
     echo 'Adding key with apt-key.' >&2