#!/bin/sh -e if command -v musl-gcc >/dev/null; then compiler=musl-gcc else compiler=gcc fi target_dir=exe/compiled src_dir=src compiler_options="-std=c17 -pedantic-errors -D_POSIX_C_SOURCE=200809L -D_FILE_OFFSET_BITS=64 -O3 -static -pthread -I $src_dir/foreign" mkdir -p "$target_dir" $compiler $compiler_options "$src_dir/main.c" -o "$target_dir/sdupes" chmod +x "$target_dir/sdupes"