diff --git a/.gitmodules b/.gitmodules index 38e1a97e..2d5117c1 100644 --- a/.gitmodules +++ b/.gitmodules @@ -6,7 +6,7 @@ url = git://github.com/lhunath/InAppSettingsKit.git [submodule "External/KCOrderedAccessorFix"] path = External/KCOrderedAccessorFix - url = https://github.com/CFKevinRef/KCOrderedAccessorFix.git + url = https://github.com/lhunath/KCOrderedAccessorFix.git [submodule "External/AttributedMarkdown"] path = External/AttributedMarkdown url = https://github.com/dreamwieber/AttributedMarkdown.git diff --git a/MasterPassword/C/mpw.c b/MasterPassword/C/mpw.c index 13994a09..ea286d12 100644 --- a/MasterPassword/C/mpw.c +++ b/MasterPassword/C/mpw.c @@ -95,13 +95,24 @@ char *homedir(const char *filename) { return homefile; } +char *getlinep(const char *prompt) { + char *buf = NULL; + size_t bufSize = 0; + ssize_t lineSize; + fprintf(stderr, "%s", prompt); + fprintf(stderr, " "); + if ((lineSize = getline(&buf, &bufSize, stdin)) < 0) { + free(buf); + return NULL; + } + buf[lineSize - 1]=0; + return buf; +} + int main(int argc, char *const argv[]) { - if (argc < 2) - usage(); - // Read the environment. - const char *userName = getenv( MP_env_username ); + char *userName = getenv( MP_env_username ); const char *masterPassword = NULL; const char *siteName = NULL; MPElementType siteType = MPElementTypeGeneratedLong; @@ -156,13 +167,17 @@ int main(int argc, char *const argv[]) { // Convert and validate input. if (!userName) { - fprintf(stderr, "Missing user name.\n"); - return 1; + if (!(userName = getlinep("Your user name:"))) { + fprintf(stderr, "Missing user name.\n"); + return 1; + } } trc("userName: %s\n", userName); if (!siteName) { - fprintf(stderr, "Missing site name.\n"); - return 1; + if (!(siteName = getlinep("Site name:"))) { + fprintf(stderr, "Missing site name.\n"); + return 1; + } } trc("siteName: %s\n", siteName); if (siteCounterString) diff --git a/MasterPassword/ObjC/iOS/MPUsersViewController.m b/MasterPassword/ObjC/iOS/MPUsersViewController.m index c64d76eb..f25869bc 100644 --- a/MasterPassword/ObjC/iOS/MPUsersViewController.m +++ b/MasterPassword/ObjC/iOS/MPUsersViewController.m @@ -682,8 +682,10 @@ referenceSizeForFooterInSection:(NSInteger)section { } ); PearlAddNotificationObserver( NSPersistentStoreCoordinatorStoresDidChangeNotification, [MPiOSAppDelegate get].storeCoordinator, nil, ^(MPUsersViewController *self, NSNotification *note) { - [self registerObservers]; - [self reloadUsers]; + PearlMainQueue( ^{ + [self registerObservers]; + [self reloadUsers]; + } ); } ); } diff --git a/MasterPassword/ObjC/iOS/MasterPassword-iOS.xcodeproj/project.pbxproj b/MasterPassword/ObjC/iOS/MasterPassword-iOS.xcodeproj/project.pbxproj index cedb53e9..181c68fb 100644 --- a/MasterPassword/ObjC/iOS/MasterPassword-iOS.xcodeproj/project.pbxproj +++ b/MasterPassword/ObjC/iOS/MasterPassword-iOS.xcodeproj/project.pbxproj @@ -3504,9 +3504,8 @@ outputPaths = ( ); runOnlyForDeploymentPostprocessing = 0; - shellPath = "/bin/sh -e"; + shellPath = "/bin/sh -xe"; shellScript = "exec ../../../Scripts/genassets"; - showEnvVarsInLog = 0; }; DAD3125D155288AA00A3F9ED /* Run Script: Crashlytics */ = { isa = PBXShellScriptBuildPhase; diff --git a/Scripts/genassets b/Scripts/genassets index 53638fbf..584cf41a 100755 --- a/Scripts/genassets +++ b/Scripts/genassets @@ -121,6 +121,7 @@ if [[ "$(latest "$ios_icon"/*)" -nt "$appiconset/Contents.json" ]] || printf '],"info":{"version":1,"author":"genassets"},"properties":{"pre-rendered":true}}\n' } > "$appiconset/Contents.json" fi +exit if [[ "$(latest "$ios_launch"/*)" -nt "$launchimage/Contents.json" ]]; then rm -rf "$launchimage"; mkdir -p "$launchimage" diff --git a/Site/mpw-js/css/main.css b/Site/mpw-js/css/main.css index ed0a108f..336855b9 100644 --- a/Site/mpw-js/css/main.css +++ b/Site/mpw-js/css/main.css @@ -1,4 +1,4 @@ -@import url(http://fonts.googleapis.com/css?family=Flamenco:300|Exo+2:400,100,900); +@import url(://fonts.googleapis.com/css?family=Flamenco:300|Exo+2:400,100,900); /**** BASE STYLE ****/ html { diff --git a/Site/mpw-js/js/dependencies.js b/Site/mpw-js/js/dependencies.js index 0d54f51c..ebd155ea 100644 --- a/Site/mpw-js/js/dependencies.js +++ b/Site/mpw-js/js/dependencies.js @@ -37,7 +37,7 @@ try { ES6 || document.write("