<commit_before>#!/bin/sh

DOTFILES_BOOTSTRAP=false source ./bootstrap.sh

package="FiloSottile/musl-cross/musl-cross"

command_is_executable brew \
    || die "Currenrly only macOS (via homebrew) is supported for installing ${package}"

# TODO: check all executables
if ! command_is_executable x86_64-linux-musl-gcc; then
    # FIXME: DOTFILES_HOMEBREW_OPTS
    DOTFILES_HOMEBREW_OPTS="--with-arm-hf --with-aarch64 --with-arm"

    install_packages "${package}" || die "Installing ${package} failed"
fi

if command_is_executable cargo >/dev/null 2>&1; then
    if ! grep -q "x86_64-linux-musl-gcc" ~/.cargo/config
    cat >>~/.cargo/config <<EOF

[target.x86_64-unknown-linux-musl]
linker = "x86_64-linux-musl-gcc"
EOF
    fi
fi<commit_msg>Fix musl-cross.sh cargo config<commit_after>#!/bin/sh

DOTFILES_BOOTSTRAP=false source ./bootstrap.sh

package="FiloSottile/musl-cross/musl-cross"

command_is_executable brew \
    || die "Currenrly only macOS (via homebrew) is supported for installing ${package}"

# TODO: check all executables
if ! command_is_executable x86_64-linux-musl-gcc; then
    # FIXME: DOTFILES_HOMEBREW_OPTS
    DOTFILES_HOMEBREW_OPTS="--with-arm-hf --with-aarch64 --with-arm"

    install_packages "${package}" || die "Installing ${package} failed"
fi

if command_is_executable cargo >/dev/null 2>&1; then
    if ! grep -q "x86_64-linux-musl-gcc" ~/.cargo/config 2>/dev/null; then
        printf '\n\n[target.x86_64-unknown-linux-musl]\nlinker = "x86_64-linux-musl-gcc"' >> ~/.cargo/config
    fi
fi
{'fraction_non_alphanumeric': 0.13627386438446346, 'fraction_numerical': 0.026991441737985518, 'mean_word_length': 4.100671140939597, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 12, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4460210', 'n_tokens_mistral': 616, 'n_tokens_neox': 569, 'n_words': 117}