new features
This commit is contained in:
Executable
+21
@@ -0,0 +1,21 @@
|
||||
#!/bin/bash
|
||||
set -euo pipefail
|
||||
ROOT="$(cd "$(dirname "$0")/.." && pwd)"
|
||||
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"
|
||||
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"
|
||||
else
|
||||
sudo install -m 755 "$BIN" "$PREFIX/bin/accompose"
|
||||
fi
|
||||
printf 'Installed: %s/bin/accompose\n' "$PREFIX"
|
||||
"$PREFIX/bin/accompose" --help
|
||||
Reference in New Issue
Block a user