mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-02-12 17:27:56 +00:00
make all test CC=fatcosmocc AR='fatcosmoar rcu' This change introduces a program named mktemper.com which provides more reliable and secure temporary file name generation for scripts. It also makes our ar.com program more permissive in what commands it'll accept. The cosmocc command is improved by this change too.
29 lines
562 B
Bash
Executable file
29 lines
562 B
Bash
Executable file
#!/bin/sh
|
|
|
|
PROG=${0##*/}
|
|
MODE=${MODE:-$m}
|
|
COSMO=${COSMO:-/opt/cosmo}
|
|
|
|
fatal_error() {
|
|
echo "$PROG: $1" >&2
|
|
exit 1
|
|
}
|
|
|
|
if [ ! -x "$COSMO/o/$MODE/tool/build/ar.com" ]; then
|
|
fatal_error "you need to run: cosmocc --update"
|
|
fi
|
|
|
|
if [ x"$1" = x"rc" ] ||
|
|
[ x"$1" = x"rcD" ] ||
|
|
[ x"$1" = x"rcu" ] |
|
|
[ x"$1" = x"rcuD" ] ||
|
|
[ x"$1" = x"rcs" ] ||
|
|
[ x"$1" = x"rcsD" ] ||
|
|
[ x"$1" = x"--help" ] ||
|
|
[ x"$1" = x"--version" ]; then
|
|
AR="$COSMO/o/$MODE/tool/build/ar.com"
|
|
else
|
|
AR="$COSMO/o/third_party/gcc/bin/x86_64-linux-musl-ar"
|
|
fi
|
|
|
|
exec "$AR" "$@"
|