#!/bin/bash

# enable foreign architectures
for arch in i386; do
    if dpkg --print-architecture | grep --line-regexp $arch; then
        # it's the main architecture, nothing to do
        true
    elif dpkg --print-foreign-architectures | grep --line-regexp $arch; then
        # already added to foreign architectures list, nothing to do
        true
    else
        dpkg --add-architecture $arch
    fi
done
