Forked from benvium/installMobileProvisionFile.sh
Last active
January 16, 2020 22:37
-
-
Save d4r1091/e138162b2de7f0bc850f302ff573cf9e to your computer and use it in GitHub Desktop.
This script installs a .mobileprovision file via bash (no GUI session needed) - Tested on zsh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# 2012 - Ben Clayton (benvium). Calvium Ltd | |
# 2017 - Dario Carlomagno (d4r1091). Tictrac Ltd | |
# | |
# This script installs a .mobileprovision file without using Xcode. Unlike Xcode, it'll | |
# work over SSH. | |
# | |
# Requires Mac OS X (I'm using 10.7 and Xcode 4.3.2) | |
# | |
# Usage installMobileProvisionFile.sh path/to/foobar.mobileprovision | |
if [ ! $# == 1 ]; then | |
echo "Usage: $0 (path/to/mobileprovision)" | |
exit | |
fi | |
mp=$1 | |
uuid=`echo $(security cms -D -i ${mp}) | sed -n "/UUID/ s/.*<string>\(.*\)<\/string>.*/\1/p"` | |
echo "Found UUID $uuid" | |
output="$HOME/Library/MobileDevice/Provisioning Profiles/$uuid.mobileprovision" | |
echo "creating provisioning profile directory if doesn't exists (Running on CD machine)" | |
mkdir -p "$HOME/Library/MobileDevice/Provisioning Profiles/" | |
echo "copying to $output..." | |
cp -f "${mp}" "$output" | |
echo "done" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Updated and currently working