new features
This commit is contained in:
+11
-7
@@ -5,17 +5,21 @@ PREFIX="${PREFIX:-/opt/homebrew}"
|
||||
if ! command -v xcodebuild >/dev/null 2>&1; then
|
||||
echo 'Xcode command-line tools / Xcode required.' >&2; exit 1
|
||||
fi
|
||||
xcodebuild -project "$ROOT/AppleContainerCompose.xcodeproj" -scheme accompose \
|
||||
-configuration Release -derivedDataPath "$ROOT/.build" CODE_SIGNING_ALLOWED=NO build
|
||||
BIN="$ROOT/.build/Build/Products/Release/accompose"
|
||||
TEMP_ROOT="${TMPDIR:-/private/tmp}"
|
||||
if [ -d /Volumes/ChatGPT ]; then TEMP_ROOT=/Volumes/ChatGPT; fi
|
||||
BUILD_DIR="$(mktemp -d "$TEMP_ROOT/container-compose-install.XXXXXX")"
|
||||
trap 'rm -rf "$BUILD_DIR"' EXIT
|
||||
xcodebuild -project "$ROOT/ContainerCompose.xcodeproj" -scheme container-compose \
|
||||
-configuration Release -derivedDataPath "$BUILD_DIR" CODE_SIGNING_ALLOWED=NO build
|
||||
BIN="$BUILD_DIR/Build/Products/Release/container-compose"
|
||||
if [ ! -x "$BIN" ]; then
|
||||
echo "CLI executable not found at $BIN" >&2; exit 1
|
||||
fi
|
||||
mkdir -p "$PREFIX/bin" 2>/dev/null || sudo mkdir -p "$PREFIX/bin"
|
||||
if [ -w "$PREFIX/bin" ]; then
|
||||
install -m 755 "$BIN" "$PREFIX/bin/accompose"
|
||||
install -m 755 "$BIN" "$PREFIX/bin/container-compose"
|
||||
else
|
||||
sudo install -m 755 "$BIN" "$PREFIX/bin/accompose"
|
||||
sudo install -m 755 "$BIN" "$PREFIX/bin/container-compose"
|
||||
fi
|
||||
printf 'Installed: %s/bin/accompose\n' "$PREFIX"
|
||||
"$PREFIX/bin/accompose" --help
|
||||
printf 'Installed: %s/bin/container-compose\n' "$PREFIX"
|
||||
"$PREFIX/bin/container-compose" --help
|
||||
|
||||
Reference in New Issue
Block a user