#!/bin/sh . "./default.conf" # Prepare the cross-compiler for the destination platform, in our # case i486. if test ! "$(getent group cross)"; then groupadd cross fi if test ! "$(getent passwd cross)"; then useradd -m -g cross cross fi # add 'cross' user as sudoer without password if test ! -f /etc/sudoers.d/cross; then echo "cross ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers.d/cross fi # we need the github keys if test ! -d $CROSS_HOME/.ssh; then mkdir $CROSS_HOME/.ssh chown cross:cross $CROSS_HOME/.ssh fi if test ! -f $CROSS_HOME/.ssh/id_rsa.pub; then cp $HOME/.ssh/id_rsa.pub $CROSS_HOME/.ssh/. cp $HOME/.ssh/id_rsa $CROSS_HOME/.ssh/. chown cross:cross $CROSS_HOME/.ssh/id_rsa* fi if test ! -x /usr/local/bin/ct-ng; then echo "Installing crosstool-ng:" su - cross <