Skip to content

Instantly share code, notes, and snippets.

@scripting
Last active September 29, 2017 20:05
Show Gist options
  • Save scripting/f122c9356733ac7373e60ae865fef702 to your computer and use it in GitHub Desktop.
Save scripting/f122c9356733ac7373e60ae865fef702 to your computer and use it in GitHub Desktop.

Revisions

  1. scripting revised this gist Sep 28, 2017. 1 changed file with 3 additions and 1 deletion.
    4 changes: 3 additions & 1 deletion systemScript.ftsc
    Original file line number Diff line number Diff line change
    @@ -6,7 +6,9 @@ on copyone (f1, f2) {
    file.surefilepath (f2);
    try {
    if file.readwholefile (f1) != file.readwholefile (f2) {
    file.copy (f1, f2)}}
    file.copy (f1, f2)
    }
    }
    else {
    file.copy (f1, f2)
    }
  2. scripting revised this gist Sep 28, 2017. 1 changed file with 10 additions and 6 deletions.
    16 changes: 10 additions & 6 deletions systemScript.ftsc
    Original file line number Diff line number Diff line change
    @@ -8,15 +8,19 @@ on copyone (f1, f2) {
    if file.readwholefile (f1) != file.readwholefile (f2) {
    file.copy (f1, f2)}}
    else {
    file.copy (f1, f2)}};
    file.copy (f1, f2)
    }
    };

    fileloop (f in sourcefolder) { //copy to montauk
    local (fname = file.filefrompath (f));
    if not (fname endswith ".opml") {
    copyone (f, montaukfolder + fname)}};
    bundle { //copy to github
    copyone (sourcefolder + "publisher.js", githubfolder + "publisher.js");
    copyone (sourcefolder + "package.json", githubfolder + "package.json");
    copyone (sourcefolder + "readme.md", githubfolder + "README.md")};
    copyone (f, montaukfolder + fname)
    }
    };

    copyone (sourcefolder + "publisher.js", githubfolder + "publisher.js");
    copyone (sourcefolder + "package.json", githubfolder + "package.json");
    copyone (sourcefolder + "readme.md", githubfolder + "README.md");

    speaker.beep ()
  3. scripting created this gist Sep 28, 2017.
    22 changes: 22 additions & 0 deletions systemScript.ftsc
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,22 @@
    local (sourcefolder = user.prefs.dropboxfolder + "public:misc:nodeeditor:fargo.io-code-publisher:");
    local (githubfolder = user.prefs.githubfolder + "fargoPublisher:");
    local (montaukfolder = user.prefs.dropboxfolder + "montauk:fargopub:");

    on copyone (f1, f2) {
    file.surefilepath (f2);
    try {
    if file.readwholefile (f1) != file.readwholefile (f2) {
    file.copy (f1, f2)}}
    else {
    file.copy (f1, f2)}};

    fileloop (f in sourcefolder) { //copy to montauk
    local (fname = file.filefrompath (f));
    if not (fname endswith ".opml") {
    copyone (f, montaukfolder + fname)}};
    bundle { //copy to github
    copyone (sourcefolder + "publisher.js", githubfolder + "publisher.js");
    copyone (sourcefolder + "package.json", githubfolder + "package.json");
    copyone (sourcefolder + "readme.md", githubfolder + "README.md")};

    speaker.beep ()