2
0
MasterPassword/Scripts/updateDependencies
Maarten Billemont d8578e0162 USM fix and misc fixes.
[UPDATED]   UbiquityStoreManager to fix "bad file descriptor" errors.
[FIXED]     Crashlytics script when plist is empty.
[FIXED]     Missing DCIntrospect in updateDependencies.
[UPDATED]   Project configuration.
2013-12-03 20:34:48 -05:00

42 lines
1.3 KiB
Bash
Executable File

#!/usr/bin/env bash
# This script should be in the 'Scripts' directory under the git repository's root.
cd "${BASH_SOURCE%/*}/.."
shopt -s extglob
## Submodules that need to be checked out.
dependencies=( External/{FontReplacer,InAppSettingsKit,Pearl{,:External/jrswizzle,:External/uicolor-utilities,:External/iOSPorts},google-plus-ios-sdk,UbiquityStoreManager,RHStatusItemView,LoveLyndir,DCIntrospect} )
## Custom migration.
# None yet.
################################################################################
isCheckedOut() {
local modulePath=$1
! git submodule status | grep -q "^-[^ ]* $modulePath"
}
# git submodule sync -- A bug causes this to init ALL external dependencies.
git submodule sync $(git submodule status | awk '/^ / { print $2 }')
# Check out our missing dependencies
for dependency in "${dependencies[@]}"; do
[[ $dependency = *:* ]] && root=${dependency%%:*} || root=.
path=${dependency#*:}
( cd "$root"; git submodule update --init "$path" )
done
# Update our modules
git submodule update
# Our modules may define a custom update script, if so, run it.
find !(Scripts)/ -name "${BASH_SOURCE##*/}" -exec {} \;
# Finally, for our modules that haven't got a custom update script, update them recursively.
git submodule update --recursive --rebase