Mac

tar ballが .gzだろうが.xzだろうが.zstだろうが解凍してやる!

TL;DR #!/bin/bash untar_by_file_type() { if [[ "$1" == "application/x-tar" ]]; then tar -xvf "$2" elif [[ "$1" == "application/gzip" ]]; then tar -zxvf "$2" elif [[ "$1" == "application/x-xz" ]]; then tar -Jxvf "$2" elif [[ "$1" == "application/zstd" ]]; then tar --use-compress-program unzstd -xvf "$2" fi } untar() { if [[ "$1" == "" ]]; then echo "usage: untar <archive-filename>" exit 1 fi untar_by_file_type "$(file -b --mime-type "$1")" "$1"

RustでLLVM IRを扱いたいのにinkwellのコンパイルにコケる

error: No suitable version of LLVM was found system-wide or pointed to by LLVM_SYS_110_PREFIX. Consider using `llvmenv` to compile an appropriate copy of LLVM, and refer to the llvm-sys documentation for more information. llvm-sys: https://crates.io/crates/llvm-sys llvmenv: https://crates.io/crates/llvmenv --> /Users/tsunekawataiki/.cargo/registry/src/github.com-1ecc6299db9ec823/llvm-sys-110.0.1/src/lib.rs:486:1 | 486 | / std::compile_error!(concat!( 487 | | "No suitable version of LLVM was found system-wide or pointed 488 | | to by LLVM_SYS_", 489 | | env!("CARGO_PKG_VERSION_MAJOR"), ... | 496