Make --gcc6 work with fish; add 'source' to usage
This commit is contained in:
parent
a2484f2492
commit
946417d314
|
@ -2,12 +2,21 @@
|
|||
# Copyright 2018 Oliver Smith
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
if [ "$argv" != "" ]
|
||||
and [ "$argv" != "--gcc6" ]
|
||||
echo "usage: source envkernel.fish"
|
||||
echo "optional arguments:"
|
||||
echo " --gcc6 Use GCC6 cross compiler"
|
||||
echo " --help Show this help message"
|
||||
exit 1
|
||||
end
|
||||
|
||||
# Fish compatibility code from envkernel.sh
|
||||
set script_dir (dirname (status filename))
|
||||
sh "$script_dir/envkernel.sh" --fish 1>| read -z fishcode
|
||||
sh "$script_dir/envkernel.sh" $argv --fish 1>| read -z fishcode
|
||||
|
||||
# Verbose output
|
||||
if [ "$argv" = "-v" ]
|
||||
# Verbose output (enable with: 'set ENVKERNEL_FISH_VERBOSE 1')
|
||||
if [ "$ENVKERNEL_FISH_VERBOSE" = "1" ]
|
||||
echo "(eval code start)"
|
||||
printf "$fishcode"
|
||||
echo "(eval code end)"
|
||||
|
|
|
@ -187,12 +187,12 @@ cross_compiler_version() {
|
|||
print_usage() {
|
||||
# shellcheck disable=SC2039
|
||||
if [ -n "${BASH_SOURCE[0]}" ]; then
|
||||
echo "usage: $(basename "${BASH_SOURCE[0]}")"
|
||||
echo "usage: source $(basename "${BASH_SOURCE[0]}")"
|
||||
else
|
||||
echo "usage: $(basename "$1")"
|
||||
echo "usage: source $(basename "$1")"
|
||||
fi
|
||||
echo "optional arguments:"
|
||||
echo " --fish Print fish alias syntax"
|
||||
echo " --fish Print fish alias syntax (internally used)"
|
||||
echo " --gcc6 Use GCC6 cross compiler"
|
||||
echo " --help Show this help message"
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue