Changes On Branch 2b5c357209388cd5
Not logged in

Changes In Branch uploaderClient Through [2b5c357209] Excluding Merge-Ins

This is equivalent to a diff from 6240d4658d to 2b5c357209

2016-12-18
21:53
Initial work on the package uploader client. Not yet fully working nor tested. check-in: 43aac90409 user: mistachkin tags: trunk
2016-12-17
08:34
Remove superfluous 'return' command. check-in: 07be60251c user: mistachkin tags: uploaderClient
08:33
More work in progress on the uploader client. check-in: 2b5c357209 user: mistachkin tags: uploaderClient
05:31
Add stub file for the package uploader tool. check-in: 6240d4658d user: mistachkin tags: trunk
05:07
Initial work on the package uploader client. Add procedures to permit programmatically signing package files. check-in: 9f66ed055c user: mistachkin tags: trunk

Modified client/1.0/neutral/pkgr_upload.eagle from [de331db2a1] to [5baa659a02].

32
33
34
35
36
37
38









































































39
40
41
42
43
44
45
    puts stdout "usage:\
  [file tail [info nameofexecutable]]\
  [file tail [info script]] \[apiKey\] \[name\] \[version\] \[language\]\
  \[fileName1\] ... \[fileNameN\]"

    exit 1
  }










































































  #
  # NOTE: Figure out the fully qualified path to the current script file.
  #       If necessary, add it to the auto-path for the interpreter.  The
  #       necessary supporting packages (i.e. the Package Repository and
  #       other support packages) that are assumed to exist in the same
  #       directory as the current script file.







>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>







32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
    puts stdout "usage:\
  [file tail [info nameofexecutable]]\
  [file tail [info script]] \[apiKey\] \[name\] \[version\] \[language\]\
  \[fileName1\] ... \[fileNameN\]"

    exit 1
  }

  proc getOuterDirectory { fileNames } {
    set result ""
    set resultParts [list]

    foreach fileName $fileNames {
      set directory [file dirname $fileName]
      set directoryParts [file split $directory]

      if {[llength $resultParts] == 0 || \
          [llength $directoryParts] < [llength $resultParts]} then {
        set result $directory
        set resultParts $directoryParts
      } elseif {[llength $directoryParts] == [llength $resultParts]} then {
        set result [file dirname $directory]
        set resultParts [file split $result]
      }
    }

    return $result
  }

  #
  #
  #
  proc getScriptChunkForFileNames { fileNames } {
    set relativeFileNames [list]

    foreach fileName $fileNames {

    }

    set result ""

    foreach relativeFileName $relativeFileNames {
      if {[string length $result] > 0} then {
        append result \n
      }

      append result {  lappend fileNames [file join }
      append result [file split $relativeFileName]
      append result \]
    }

    return $result
  }

  #
  #
  #
  proc createRepositoryScript { language version platform fileNames options } {
    return [string trim [string map [list \r\n \n \
        %language% $language %version% $version %platform% $platform \
        %fileNames% [getScriptChunkForFileNames $fileNames]] {
apply [list [list] {
  package require Eagle.Package.Downloader

  ::PackageDownloader::resetCookieAndLoginSimple

  set fileNames [list]

%fileNames%

  set options [list \
      -persistent false -usePgp true -useAutoPath true]

  ::PackageDownloader::downloadFiles %language% %version% %platform% $fileNames $options
  ::PackageDownloader::logoutAndResetCookie
}]
    }]]

    return ""
  }

  #
  # NOTE: Figure out the fully qualified path to the current script file.
  #       If necessary, add it to the auto-path for the interpreter.  The
  #       necessary supporting packages (i.e. the Package Repository and
  #       other support packages) that are assumed to exist in the same
  #       directory as the current script file.