def run(self): if self.group: family = "%s:%s" % (bash_quote(self.user), bash_quote(self.group)) else: family = bash_quote(self.user) command = "sudo chown %s %s" % (family, bash_quote(self.target)) yield Script(command)
def run(self): extra_options = "" if self.recursive: extra_options = "--recursive" yield Script("git clone %s -- %s %s" % (extra_options, bash_quote(self.source), bash_quote(self.target)))
def run(self): with self.task_lock(): if not self._already_installed(): yield Chown(self.installation_root, get_username()) yield Gitclone("https://github.com/Homebrew/brew.git", self.installation_root) if self.package and self.package not in self._installed_packages(): extra_options = "" if self.force_bottle: extra_options = "--force-bottle" yield Script("brew install %s %s" % (extra_options, bash_quote(self.package))) if self.cask_package: if self.cask_package not in self._cask_installed_packages(): yield Script("brew cask install %s" % bash_quote(self.cask_package)) if self.tap and self.tap not in self._taps(): yield Script("brew tap %s" % bash_quote(self.tap))
def onlyif(self): if self.package: with self.task_lock(): payload = "require 'json'; puts JSON::dump Gem::Specification.map {|g| g.name}" installed_packages_bytes = yield Script("ruby -e %s" % bash_quote(payload), _internal=True) installed_packages = json.loads(installed_packages_bytes) yield self.package not in installed_packages
def run(self): with self.task_lock(): extra_options = "--user-install" if self.version: target = "%s==%s" % (self.package, self.version) else: target = self.package command = "gem install %s %s" % (extra_options, bash_quote(target)) yield Script(command)
def run(self): with self.task_lock(): if self.package and self.package not in self._installed_packages(): extra_options = "--global" if self.version: target = "%s@%s" % (self.package, self.version) else: target = self.package command = "npm install %s %s" % (extra_options, bash_quote(target)) yield Script(command)
def run(self): with self.task_lock(): if not self._already_installed(): yield Homebrew("python3") if self.package and self.package not in self._installed_packages(): extra_options = "--user --ignore-installed" if self.version: target = "%s==%s" % (self.package, self.version) else: target = self.package command = "pip3 install %s %s" % (extra_options, bash_quote(target)) yield Script(command)
def run(self): yield Script("defaults write %s %s -%s %s" % (bash_quote(self.domain), bash_quote(self.key), bash_quote(self.value_type), bash_quote(str(self.value))))
def onlyif(self): command = "defaults read %s %s" % (bash_quote(self.domain), bash_quote(self.key)) result = yield Script(command, _internal=True) yield result.strip() != self._check_value