mirror of
https://github.com/notwa/rc
synced 2025-03-18 15:45:38 -07:00
further cleanup
This commit is contained in:
parent
b6d7892192
commit
341b7613cc
1 changed files with 7 additions and 15 deletions
22
sh/compile
22
sh/compile
|
@ -68,25 +68,17 @@ compile() {
|
|||
fi
|
||||
fi
|
||||
|
||||
local once=0
|
||||
printsep() {
|
||||
[ $once -eq 1 ] && echo -n "|" >&2 || once=1
|
||||
local sep_once=
|
||||
print_separated() {
|
||||
echo -n "${sep_once:+|}$1" >&2
|
||||
sep_once=1
|
||||
}
|
||||
|
||||
if [ $# -lt 2 ]; then
|
||||
echo -n "usage: compile [" >&2
|
||||
if [ -n "$clang" ]; then
|
||||
printsep
|
||||
echo -n "clang" >&2
|
||||
fi
|
||||
if [ -n "$gcc" ]; then
|
||||
printsep
|
||||
echo -n "gcc" >&2
|
||||
fi
|
||||
if [ -n "$cl" ]; then
|
||||
printsep
|
||||
echo -n "msvc" >&2
|
||||
fi
|
||||
[ -n "$clang" ] && print_separated "clang"
|
||||
[ -n "$gcc" ] && print_separated "gcc"
|
||||
[ -n "$cl" ] && print_separated "cl"
|
||||
echo "] {debug|derelease|release|hardened} [flags...] {source file}" >&2
|
||||
return 1
|
||||
fi
|
||||
|
|
Loading…
Add table
Reference in a new issue