@@ -65,10 +65,11 @@ # Ignore case on completion zstyle ':completion:*' matcher-list 'm:{A-Z}={a-z} m:{a-z}={A-Z}' __has_command() { + local i for i in $@; do which $i &>/dev/null && return 0 done return 1 } @@ -261,11 +262,11 @@ fossil pull && fossil update "$@" } flgrep() { local ret=1 - fossil changes --all . | sed 's/^.* //' | while read file; do + fossil changes --all . | awk '{print $2}' | while read file; do grep -H "$@" "$file" && ret=0 [ $? -gt 1 ] && return $? done return $ret } @@ -524,38 +525,38 @@ fi export PATH="$prefix/cross/$cross_host/bin:$PATH" ;; morphos) - local pkg="ppc-morphos-gcc-10" + local pkg="ppc-morphos-gcc-11" local prefix="$(pkg_info -qp $pkg 2>/dev/null | awk '/^@cwd/ { print $2; exit }')" if [ -z "$prefix" ]; then echo "Please install $pkg from pkgsrc!" 1>&2 return 1 fi export PATH="$prefix/gg/bin:$PATH" - export CC="ppc-morphos-gcc-10" - export CXX="ppc-morphos-g++-10" + export CC="ppc-morphos-gcc-11" + export CXX="ppc-morphos-g++-11" export OBJC="$CC" export OBJCXX="$CXX" export cross_host="ppc-morphos" ;; switch) if [ -z "$DEVKITPRO" ]; then echo "Please set DEVKITPRO!" return 1 fi - if [ -z "$DEVKITA64" ]; then + if [ -z $"DEVKITA64" ]; then echo "Please set DEVKITA64!" return 1 fi - export PATH="$DEVKITA64/bin:$DEVKITPRO/tools/bin:$PATH" + export PATH="$DEVKITA64/bin:$PATH" export cross_host="aarch64-none-elf" - export objfw_configure_flags="--with-nintendo-switch" + export objfw_configure_flags="--with-$1" ;; wii | wii-u) if [ -z "$DEVKITPRO" ]; then echo "Please set DEVKITPRO!" return 1