aerospace fork
Something went wrong. Try again.
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768#!/usr/bin/env bashset -e # Exit if one of commands exit with non-zero exit codeset -u # Treat unset variables and parameters other than the special parameters ‘@’ or ‘*’ as an errorset -o pipefail # Any command failed in the pipe fails the whole pipe# set -x # Print shell commands as they are executed (or you can try -v which is less verbose)
if ! grep -q '^5\.' <<< "$BASH_VERSION"; then echo "Your bash version is too old. Version 5 is the minimum required version" > /dev/stderr exit 1fi
add-optional-dep-to-bin() { if /usr/bin/which "$1" &> /dev/null; then /bin/cat > ".deps/bin/${2:-$1}" <<EOF#!/bin/bashexec '$(/usr/bin/which "$1")' "\$@"EOF fi}
if /bin/test -z "${NUKE_PATH:-}"; then /bin/rm -rf .deps/bin /bin/mkdir -p .deps/bin
add-optional-dep-to-bin bash add-optional-dep-to-bin fish # build-shell-completion.sh add-optional-dep-to-bin rustc # build-shell-completion.sh add-optional-dep-to-bin cargo # build-shell-completion.sh add-optional-dep-to-bin brew # install-from-sources.sh add-optional-dep-to-bin bundle # build-docs.sh add-optional-dep-to-bin bundler # build-docs.sh add-optional-dep-to-bin xcbeautify # build-release.sh add-optional-dep-to-bin git add-optional-dep-to-bin swift add-optional-dep-to-bin swiftly
export PATH="${PWD}/.deps/bin:/bin:/usr/bin" chmod +x .deps/bin/* export NUKE_PATH=1fi
swift() { if /usr/bin/which swiftly &> /dev/null; then swiftly run swift "$@" else echo "warning: swiftly is not installed. Fallback to plain swift. Swift compilation might not be reproducible" > /dev/stderr /usr/bin/env swift --version /usr/bin/env swift "$@" fi}
xcodebuild-pretty() { log_file="$1" shift # Mute stderr # 2024-02-12 23:48:11.713 xcodebuild[60777:7403664] [MT] DVTAssertions: Warning in /System/Volumes/Data/SWE/Apps/DT/BuildRoots/BuildRoot11/ActiveBuildRoot/Library/Caches/com.apple.xbs/Sources/IDEFrameworks/IDEFrameworks-22269/IDEFoundation/Provisioning/Capabilities Infrastructure/IDECapabilityQuerySelection.swift:103 # Details: createItemModels creation requirements should not create capability item model for a capability item model that already exists. # Function: createItemModels(for:itemModelSource:) # Thread: <_NSMainThread: 0x6000037202c0>{number = 1, name = main} # Please file a bug at https://feedbackassistant.apple.com with this warning message and any useful information you can provide. if /usr/bin/which xcbeautify &> /dev/null; then /usr/bin/xcrun xcodebuild "$@" 2>&1 | tee "$log_file" | xcbeautify --quiet # Only print tasks that have warnings or errors echo "The full unmodified xcodebuild log is saved to $log_file" else /usr/bin/xcrun xcodebuild "$@" 2>&1 | tee "$log_file" fi}