2
0

Merge branch 'master' of github.com:Lyndir/MasterPassword

This commit is contained in:
Maarten Billemont 2014-11-17 20:15:50 -05:00
commit 00033eca37
8 changed files with 38 additions and 15 deletions

2
.gitmodules vendored
View File

@ -6,7 +6,7 @@
url = git://github.com/lhunath/InAppSettingsKit.git url = git://github.com/lhunath/InAppSettingsKit.git
[submodule "External/KCOrderedAccessorFix"] [submodule "External/KCOrderedAccessorFix"]
path = External/KCOrderedAccessorFix path = External/KCOrderedAccessorFix
url = https://github.com/CFKevinRef/KCOrderedAccessorFix.git url = https://github.com/lhunath/KCOrderedAccessorFix.git
[submodule "External/AttributedMarkdown"] [submodule "External/AttributedMarkdown"]
path = External/AttributedMarkdown path = External/AttributedMarkdown
url = https://github.com/dreamwieber/AttributedMarkdown.git url = https://github.com/dreamwieber/AttributedMarkdown.git

View File

@ -95,13 +95,24 @@ char *homedir(const char *filename) {
return homefile; 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[]) { int main(int argc, char *const argv[]) {
if (argc < 2)
usage();
// Read the environment. // Read the environment.
const char *userName = getenv( MP_env_username ); char *userName = getenv( MP_env_username );
const char *masterPassword = NULL; const char *masterPassword = NULL;
const char *siteName = NULL; const char *siteName = NULL;
MPElementType siteType = MPElementTypeGeneratedLong; MPElementType siteType = MPElementTypeGeneratedLong;
@ -156,14 +167,18 @@ int main(int argc, char *const argv[]) {
// Convert and validate input. // Convert and validate input.
if (!userName) { if (!userName) {
if (!(userName = getlinep("Your user name:"))) {
fprintf(stderr, "Missing user name.\n"); fprintf(stderr, "Missing user name.\n");
return 1; return 1;
} }
}
trc("userName: %s\n", userName); trc("userName: %s\n", userName);
if (!siteName) { if (!siteName) {
if (!(siteName = getlinep("Site name:"))) {
fprintf(stderr, "Missing site name.\n"); fprintf(stderr, "Missing site name.\n");
return 1; return 1;
} }
}
trc("siteName: %s\n", siteName); trc("siteName: %s\n", siteName);
if (siteCounterString) if (siteCounterString)
siteCounter = atoi( siteCounterString ); siteCounter = atoi( siteCounterString );

View File

@ -682,9 +682,11 @@ referenceSizeForFooterInSection:(NSInteger)section {
} ); } );
PearlAddNotificationObserver( NSPersistentStoreCoordinatorStoresDidChangeNotification, [MPiOSAppDelegate get].storeCoordinator, nil, PearlAddNotificationObserver( NSPersistentStoreCoordinatorStoresDidChangeNotification, [MPiOSAppDelegate get].storeCoordinator, nil,
^(MPUsersViewController *self, NSNotification *note) { ^(MPUsersViewController *self, NSNotification *note) {
PearlMainQueue( ^{
[self registerObservers]; [self registerObservers];
[self reloadUsers]; [self reloadUsers];
} ); } );
} );
} }
- (void)reloadUsers { - (void)reloadUsers {

View File

@ -3504,9 +3504,8 @@
outputPaths = ( outputPaths = (
); );
runOnlyForDeploymentPostprocessing = 0; runOnlyForDeploymentPostprocessing = 0;
shellPath = "/bin/sh -e"; shellPath = "/bin/sh -xe";
shellScript = "exec ../../../Scripts/genassets"; shellScript = "exec ../../../Scripts/genassets";
showEnvVarsInLog = 0;
}; };
DAD3125D155288AA00A3F9ED /* Run Script: Crashlytics */ = { DAD3125D155288AA00A3F9ED /* Run Script: Crashlytics */ = {
isa = PBXShellScriptBuildPhase; isa = PBXShellScriptBuildPhase;

View File

@ -121,6 +121,7 @@ if [[ "$(latest "$ios_icon"/*)" -nt "$appiconset/Contents.json" ]] ||
printf '],"info":{"version":1,"author":"genassets"},"properties":{"pre-rendered":true}}\n' printf '],"info":{"version":1,"author":"genassets"},"properties":{"pre-rendered":true}}\n'
} > "$appiconset/Contents.json" } > "$appiconset/Contents.json"
fi fi
exit
if [[ "$(latest "$ios_launch"/*)" -nt "$launchimage/Contents.json" ]]; then if [[ "$(latest "$ios_launch"/*)" -nt "$launchimage/Contents.json" ]]; then
rm -rf "$launchimage"; mkdir -p "$launchimage" rm -rf "$launchimage"; mkdir -p "$launchimage"

View File

@ -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 ****/ /**** BASE STYLE ****/
html { html {

View File

@ -37,7 +37,7 @@ try {
ES6 || document.write("<script src=js/mpw-js/traceur-runtime.js><\/script>"); ES6 || document.write("<script src=js/mpw-js/traceur-runtime.js><\/script>");
// If setImmediate is not implemented we include the polyfill // If setImmediate is not implemented we include the polyfill
window.setImmediate || document.write("<script src=js/" + esdir + "setImmediate-polyfill.js><\/script>"); window.setImmediate || document.write("<script src=js/mpw-js/" + esdir + "setImmediate-polyfill.js><\/script>");
// Include the scrypt implementation // Include the scrypt implementation
var SCRYPTASM_PATH = (window.location + '').replace(/[^/]*(#[^#]*)?$/, 'js/mpw-js/scrypt-asm.js'); var SCRYPTASM_PATH = (window.location + '').replace(/[^/]*(#[^#]*)?$/, 'js/mpw-js/scrypt-asm.js');

6
Site/mpw-js/sync Executable file
View File

@ -0,0 +1,6 @@
#!/usr/bin/env bash
set -e
cd "${BASH_SOURCE[0]%/*}"
#s3cmd sync --exclude '.git/**' --delete-removed --follow-symlinks --preserve --acl-public --reduced-redundancy . s3://js.masterpasswordapp.com/
rsync -avP --no-group . satura.lyndir.com:/usr/local/www/js.masterpasswordapp.com/htdocs-secure/