コード例 #1
0
ファイル: aos.py プロジェクト: armStrapTools/armStrap
def ubootSetup(Device):
  try:
    bName = builtins.Config['Board']['model'].lower()
    fName = bName + ".fex"
    Utils.copyFiles(Utils.getPath("mnt/usr/share/armStrap-U-Boot/" + bName + "/"+ fName), Utils.getPath("mnt/boot/" + fName))
    Utils.runChrootCommand(command = "/usr/bin/fex2bin /boot/" + fName + " /boot/script.bin")
    Utils.runCommand(command = "/bin/dd if=" + Utils.getPath("mnt/usr/share/armStrap-U-Boot/" + bName + "/u-boot-sunxi-with-spl.bin") + " of=" + Device + " bs=1024 seek=8")
  except SystemExit:
    pass
  except:
    logging.exception("Caught Exception")
    sys.exit(os.EX_SOFTWARE)
コード例 #2
0
ファイル: extractor.py プロジェクト: gofed/lib
	def _getGoSymbols(self, path, imports_only=False):
		script_dir = getScriptDir(__file__) + "/."
		options = ""
		if imports_only:
			options = "-imports"

		so, se, rc = runCommand("%s/parseGo %s '%s'" % (script_dir, options, path))
		if rc != 0:
			return (1, se)

		return (0, so)
コード例 #3
0
ファイル: extractor.py プロジェクト: pombredanne/gofedlib
    def _getGoSymbols(self, path, imports_only=False):
        script_dir = getScriptDir(__file__) + "/."
        options = ""
        if imports_only:
            options = "-imports"

        so, se, rc = runCommand("%s/parseGo %s '%s'" %
                                (script_dir, options, path))
        if rc != 0:
            return (1, se)

        return (0, so)
コード例 #4
0
ファイル: extractor.py プロジェクト: gofed/gofedlib
    def extract(self):
        options = [
            "--package-path {}".format(self._package_path),
            "--package-prefix {}:{}".format(self._package_path, self._hexsha),
            "--symbol-table-dir {}".format(self._generated),
            "--goversion {}".format(self._goversion),
            "--library",
        ]

        if self._cgo != "":
            options.append("--cgo-symbols-path {}".format(self._cgo))

        if self._depsfile.endswith("glide.lock"):
            options.append("--glidefile {}".format(self._depsfile))
        elif self._depsfile.endswith("Godeps.json"):
            options.append("--godepsfile {}".format(self._depsfile))
        else:
            raise ValueError("Dependency file {} not recognized".format(self._depsfile))

        self._so, se, rc = runCommand("GOPATH={} goextract {}".format(self._gopath, " ".join(options)))
        if rc != 0:
            raise ExtractionException("goextract({}): {}".format(rc, se))

        return self
コード例 #5
0
	def _getLicense(self, doc):
		# TODO(jchaloup): find licence check written in python
		so, se, rc = runCommand("licensecheck %s" % doc)
		if rc == 0:
			return ":".join(so.split("\n")[0].split(":")[1:]).strip()
		return "Unknown"
コード例 #6
0
 def _getLicense(self, doc):
     # TODO(jchaloup): find licence check written in python
     so, se, rc = runCommand("licensecheck %s" % doc)
     if rc == 0:
         return ":".join(so.split("\n")[0].split(":")[1:]).strip()
     return "Unknown"