mirror of
https://github.com/passepartoutvpn/passepartout-apple.git
synced 2025-01-22 16:42:09 +00:00
6e8f10f919
- Move non-CI scripts to "scripts" - Use lowercase variables consistently - Work with relative paths - Work with environment - Parametrize Xcode build/version number (move uniq last)
18 lines
390 B
Bash
Executable File
18 lines
390 B
Bash
Executable File
#!/bin/bash
|
|
if [[ -z "$1" ]]; then
|
|
echo "Path to Xcode project required"
|
|
exit 1
|
|
fi
|
|
if [[ -z "$2" ]]; then
|
|
echo "Setting key required"
|
|
exit 1
|
|
fi
|
|
if [[ -z "$3" ]]; then
|
|
echo "Setting regex required"
|
|
exit 1
|
|
fi
|
|
xcodeproj="$1"
|
|
setting_key="$2"
|
|
setting_pattern="$3"
|
|
grep $setting_key $xcodeproj | sed -E "s/^.*${setting_key} = ${setting_pattern};/\1/" | uniq | tr -d '\n'
|