Brew mac os casks

Содержание
  1. Команда brew-cask: опции, ключи и примеры использования
  2. brew-bundle
  3. brightness
  4. Как установить PostgreSQL на Linux и создать базу и пользователя
  5. Как скопировать вывод команды из терминала в буфер обмена Linux и MacOS
  6. Как создать неизменяемый файл в Linux / MacOS / FreeBSD
  7. Как удалить все Docker образы и контейнеры
  8. Bash вывода && управляющие конструкции || коротко о главном
  9. Так ли безопасен Linux? Несколько коммитов с уязвимосятми в stable
  10. Microsoft открывает исходники, а её IDE супер-популярна
  11. Пример своей консольной команды в Django проекте
  12. Как на Bash посчитать число строк в проекте (директории)
  13. Как на Bash получить файлы, изменённые за сегодняшний день
  14. Как установить часовой пояс в Linux
  15. Как найти самые большие папки и файлы в Linux
  16. Команда grep – полезные ключи и примеры использования
  17. Homebrew: Менеджер пакетов для OS X
  18. Что оно делает?
  19. Зачем оно?
  20. Звучит неплохо. Как это установить?
  21. Brew mac os casks
  22. Homebrew Documentation
  23. The Cask Language Is Declarative
  24. Conditional Statements
  25. Efficiency
  26. Version Comparisons
  27. Always Fall Through to the Newest Case
  28. Switch Between Languages or Regions
  29. Arbitrary Ruby Methods
  30. Header Line Details
  31. Stanza order
  32. Stanzas
  33. Required Stanzas
  34. At Least One Artifact Stanza Is Also Required
  35. Optional Stanzas
  36. Stanza descriptions
  37. Stanza: app

Команда brew-cask: опции, ключи и примеры использования

Package manager for macOS applications distributed as binaries.

brew cask search <>

  • List all installed casks:
  • List installed casks that have newer versions available:

brew cask outdated

  • Upgrade an installed cask to its latest version:

brew cask reinstall <>

brew cask uninstall <>

  • Display information about a given cask:

brew-bundle

bundle Bundler for Homebrew, Homebrew Cask and the Mac App…

brightness

Get and set the brightness level of all internal and…

Как установить PostgreSQL на Linux и создать базу и пользователя

PostgreSQL — система управления базой данных общего назначения. Одна из самых распространённых баз данных, используемая на многих коммерческих и некоммерческих проектах.

Как скопировать вывод команды из терминала в буфер обмена Linux и MacOS

Скорее приятный, чем необходимы «трюк», но возможность использовать возможность скопировать вывод в буфер обмена – действительно круто иной раз выручает.

Как создать неизменяемый файл в Linux / MacOS / FreeBSD

Само собой, root может всё (если введёт пару команд), однако, это вполне легальный способ запретить изменение файла.

Как удалить все Docker образы и контейнеры

Не всегда нужно удалять всё, но объяснение данного «рецепта» объяснит как в целом удалять образы и контейнеры.

Bash вывода && управляющие конструкции || коротко о главном

Небольшая заметка о конструкциях Bash, в которых путается большинство новичков. А именно: >,

Так ли безопасен Linux? Несколько коммитов с уязвимосятми в stable

Исследователи сумели пройти code-review с реквестами в ядро Linux, заведомо содержащими добавление уязвимостей.

Microsoft открывает исходники, а её IDE супер-популярна

Решил сложить пару фактов и немного над этим поразмыслить. Реально ли Microsoft «переобулись»?

Пример своей консольной команды в Django проекте

Если вы работали с Django проектом, то, скорее всего, запускали команды из консоли (manage.py). В Django есть простой способ писать свои команды для управления проектом.

Как на Bash посчитать число строк в проекте (директории)

Ниже будет представлен однострочник, решающий данную задачу на Bash + пошаговое описание его работы.

Как на Bash получить файлы, изменённые за сегодняшний день

Bash имеет огромные возможности по программированию/скриптованию и администрированию операционной системы. Не важно: Linux это, FreeBSD, или MacOS – на Bash можно сделать многое.

Как установить часовой пояс в Linux

В рамках первичной настройки Операционной Системы важно установить и по какому времени вы живёте, ведь при следующем обновлении времени через Интернет ваше время слетит.

Как найти самые большие папки и файлы в Linux

Когда кончается место на жестком диске, возникает закономерный вопрос: на что же оно было потрачено, какие файлы разрослись больше положенного?

Команда grep – полезные ключи и примеры использования

У команды «grep» довольно много различных особенностей. особенно, если учесть, что с английского это «решето» – а что может войти в решето , не факт что выйдет!

Источник

Homebrew: Менеджер пакетов для OS X

Все менеджеры пакетов в Unix имеют определенные недостатки и большинство Linux-дистрибутивов пытаются по-разному эти недостатки обойти. В этом посте я расскажу про Homebrew — новый менеджер пакетов, нацеленный на простоту использования.

До Homebrew было несколько различных попыток создать эффективные пакетные менеджеры для OS X. Две наиболее популярные вылились в итоге в Fink и Macports, но у каждой из них все равно есть свои острые углы. В частности, в обоих создание своих пакетов или портов является черезчур сложным.

В Homebrew создавать новые пакеты и работать с ними проще пареной репы. Давайте посмотрим.

Что оно делает?

Основная мысль очень проста. Homebrew упрощает и автоматизирует монотонные действия по скачиванию и сборке пакетов. Если вам надоели бесконечные ./configure && make && make install , Homebrew поможет.

Читайте также:  Windows wheel mouse optical

Зачем оно?

Как я уже заметил выше, для OS X уже есть два решения: Fink и MacPorts. Если какое-то из них у вас уже установлено и всем устраивает — отлично. Но если вы имели неудачный опыт с ними в прошлом, я сильно рекомендую попробовать Homebrew. С ним намного проще. Плюс, его легко модифицировать, ведь он состоит всего из нескольких сотен строк кода на Ruby.

Homebrew не навязывает никакой строгой структуры и путей. По-умолчанию, он устанавливается в /usr/local , но его можно поставить куда угодно. Все пакеты устанавливаются в директории в специальном «подвале» (cellar), например Cellar/git/1.6.5.4/ . После установки Homebrew делает симлинки в стандартные Unix-директории. Ручная установка каких-то пакетов не из Homebrew отлично уживается с ними.

Это редко может понадобиться, но пакеты можно ставить напрямую из систем контроля версий. Если у пакета есть публичный git, svn, cvs или mercurial репозиторий, всегда можно собрать самую свежую devel-версию прямо оттуда простым brew install .

Кстати, установка занимает меньше времени, поскольку Homebrew старается избегать дублирования пакетов. Например, она не ставит очередную версию Perl в качестве зависимости, поскольку в системе уже есть готовый и работающий Perl. Плюс, Homebrew задуман так, чтобы вам не приходилось использовать sudo при работе с пакетами.

Звучит неплохо. Как это установить?

Первая и единственная зависимость Homebrew — OS X Developer Tools, которые есть на любом установочном диске с OS X и доступны для бесплатного скачивания с сайта Apple.

Самое простое — установить в /usr/local . Это можно сделать весьма просто:
# Присваиваем папку /usr/local себе, чтобы не использовать sudo
sudo chown -R `whoami` /usr/local
# Чиним права на mysql, если он у вас установлен
sudo chown -R mysql:mysql /usr/local/mysql
# Скачиваем и устанавливаем Homebrew с гитхаба
curl -L github.com/mxcl/homebrew/tarball/master | tar xz —strip 1 -C /usr/local

Все, установка завершена. Давайте проверим что все работает:
brew install wget
brew info git

На сайте Homebrew есть wiki, где можно почитать всякого интересного про интеграцию с Rubygems, CPAN и Python EasyInstall.

Следить за обновлениями Homebrew тоже достаточно просто:
brew install git
brew update

Если у вас установлен git, вы можете в любой момент обновлять репозитории Homebrew и устанавливать последнии версии пакетов.

Создавать свои пакеты почти так же просто. Например, если бы в Homebrew не было бы пакета для wget, его создание выглядело бы примерно так:
brew create ftp.gnu.org/gnu/wget/wget-1.12.tar.bz2

После сохранения пакета, его можно протестировать: brew install -vd wget . Если что-то работает неправильно и вам нужна помощь по настройке пакета, на wiki есть много документации. Еще там можно посмотреть примеры создания таких пакетов как git или flac.

Если вы создали новый пакет и желаете поделиться им с сообществом, это тоже достаточно просто сделать с помощью гема github.

gem install json github
git add .
git commit -m «Added a formula for wget»
github fork
git push mastergitx

После того, как вы сделаете push, нужно в Homebrew issue tracker создать новый тикет с темой «New formula: ». Если там все в порядке, ваш пакет будет добавлен в главный репозиторий Homebrew и доступен всем пользователям.

Источник

Brew mac os casks

“To install, drag this icon…” no more!

Homebrew Cask extends Homebrew and brings its elegance, simplicity, and speed to the installation and management of GUI macOS applications such as Atom and Google Chrome.

We do this by providing a friendly CLI workflow for the administration of macOS applications distributed as binaries.

To start using Homebrew Cask, you just need Homebrew installed.

And there we have it. An application installed with one quick command: no clicking, no dragging, no dropping.

  • Find basic documentation on using Homebrew Cask in USAGE.md
  • Want to contribute a Cask? Awesome! See CONTRIBUTING.md
  • More project-related details and discussion are available in the documentation

Before reporting a bug, run brew update-reset && brew update and try your command again. This is a fix-all that will reset the state of all your taps, ensuring the problem isn’t an outdated setup on your side.

If your issue persists, search for it before opening a new one. If you find an open issue and have any new information, add it in a comment. If you find a closed issue, try the solutions there.

If the issue is still not solved, see the guides for common problems:

  • Issues requesting new casks will be closed. If you want a cask added to the main repositories, submit a pull request.
  • For a feature request, use this template.

Questions? Wanna chat?

We’re really rather friendly! Here are the best places to talk about the project:

Читайте также:  Беспроводной геймпад для ноутбука windows 10

Источник

Homebrew Documentation

Each Cask is a Ruby block, beginning with a special header line. The Cask definition itself is always enclosed in a do … end block. Example:

The Cask Language Is Declarative

Each Cask contains a series of stanzas (or “fields”) which declare how the software is to be obtained and installed. In a declarative language, the author does not need to worry about order. As long as all the needed fields are present, Homebrew Cask will figure out what needs to be done at install time.

To make maintenance easier, the most-frequently-updated stanzas are usually placed at the top. But that’s a convention, not a rule.

Exception: do blocks such as postflight may enclose a block of pure Ruby code. Lines within that block follow a procedural (order-dependent) paradigm.

Conditional Statements

Efficiency

Conditional statements are permitted, but only if they are very efficient. Tests on the following values are known to be acceptable:

value examples
MacOS.version coconutbattery.rb, yasu.rb

Version Comparisons

Tests against MacOS.version may use either symbolic names or version strings with numeric comparison operators:

The available symbols for macOS versions are: :yosemite , :el_capitan , :sierra , :high_sierra , :mojave , :catalina and :big_sur . The corresponding numeric version strings should be given as major releases containing a single dot.

Note that in the official Homebrew Cask repositories only the symbolic names are allowed. The numeric comparison may only be used for third-party taps.

Always Fall Through to the Newest Case

Conditionals should be constructed so that the default is the newest OS version. When using an if statement, test for older versions, and then let the else statement hold the latest and greatest. This makes it more likely that the Cask will work without alteration when a new OS is released. Example (from coconutbattery.rb):

Switch Between Languages or Regions

If a cask is available in multiple languages, you can use the language stanza to switch between languages or regions based on the system locale.

Arbitrary Ruby Methods

In the exceptional case that the Cask DSL is insufficient, it is possible to define arbitrary Ruby variables and methods inside the Cask by creating a Utils namespace. Example:

This should be used sparingly: any method which is needed by two or more Casks should instead be rolled into the core. Care must also be taken that such methods be very efficient.

Variables and methods should not be defined outside the Utils namespace, as they may collide with Homebrew Cask internals.

Header Line Details

The first non-comment line in a Cask follows the form:

should match the Cask filename, without the .rb extension, enclosed in single quotes.

There are currently some arbitrary limitations on Cask tokens which are in the process of being removed. The Travis bot will catch any errors during the transition.

Stanza order

Having a common order for stanzas makes Casks easier to update and parse. Below is the complete stanza sequence (no Cask will have all stanzas). The empty lines shown here are also important, as they help to visually delineate information.

Note that every stanza that has additional parameters ( :symbols after a , ) shall have them on separate lines, one per line, in alphabetical order. An exception is target: which typically consists of short lines.

Stanzas

Required Stanzas

Each of the following stanzas is required for every Cask.

name multiple occurrences allowed? value
version no Application version.
See Version Stanza Details for more information.
sha256 no SHA-256 checksum of the file downloaded from url , calculated by the command shasum -a 256 . Can be suppressed by using the special value :no_check .
See Checksum Stanza Details for more information.
url no URL to the .dmg / .zip / .tgz / .tbz2 file that contains the application.
A comment should be added if the hostnames in the url and homepage stanzas differ. Block syntax should be used for URLs that change on every visit.
See URL Stanza Details for more information.
name yes String providing the full and proper name defined by the vendor.
See Name Stanza Details for more information.
desc no One-line description of the Cask. Shows when running brew info .
See Desc Stanza Details for more information.
homepage no Application homepage; used for the brew home command.

At Least One Artifact Stanza Is Also Required

Each Cask must declare one or more artifacts (i.e. something to install).

name multiple occurrences allowed? value
app yes Relative path to an .app that should be moved into the /Applications folder on installation.
See App Stanza Details for more information.
pkg yes Relative path to a .pkg file containing the distribution.
See Pkg Stanza Details for more information.
binary yes Relative path to a Binary that should be linked into the $(brew —prefix)/bin folder (typically /usr/local/bin ) on installation.
See Binary Stanza Details for more information.
colorpicker yes Relative path to a ColorPicker plugin that should be moved into the

/Library/ColorPickers folder on installation.

dictionary yes Relative path to a Dictionary that should be moved into the

/Library/Dictionaries folder on installation.

font yes Relative path to a Font that should be moved into the

/Library/Fonts folder on installation.

input_method yes Relative path to a Input Method that should be moved into the

/Library/Input Methods folder on installation.

internet_plugin yes Relative path to a Service that should be moved into the

/Library/Internet Plug-Ins folder on installation.

manpage yes Relative path to a Man Page that should be linked into the respective man page folder on installation, e.g. /usr/local/share/man/man3 for my_app.3 .
prefpane yes Relative path to a Preference Pane that should be moved into the

/Library/PreferencePanes folder on installation.

qlplugin yes Relative path to a QuickLook Plugin that should be moved into the

/Library/QuickLook folder on installation.

mdimporter yes Relative path to a Spotlight metadata importer that should be moved into the

/Library/Spotlight folder on installation.

screen_saver yes Relative path to a Screen Saver that should be moved into the

/Library/Screen Savers folder on installation.

service yes Relative path to a Service that should be moved into the

/Library/Services folder on installation.

audio_unit_plugin yes Relative path to an Audio Unit plugin that should be moved into the

/Library/Audio/Components folder on installation.

vst_plugin yes Relative path to a VST Plugin that should be moved into the

/Library/Audio/VST folder on installation.

vst3_plugin yes Relative path to a VST3 Plugin that should be moved into the

/Library/Audio/VST3 folder on installation.

suite yes Relative path to a containing directory that should be moved into the /Applications folder on installation.
See Suite Stanza Details for more information.
artifact yes Relative path to an arbitrary path that should be moved on installation. Must provide an absolute path as a target (example alcatraz.rb). This is only for unusual cases. The app stanza is strongly preferred when moving .app bundles.
installer yes Describes an executable which must be run to complete the installation.
See Installer Stanza Details for more information.
stage_only no true . Assert that the Cask contains no activatable artifacts.

Optional Stanzas

name multiple occurrences allowed? value
uninstall yes Procedures to uninstall a Cask. Optional unless the pkg stanza is used.
See Uninstall Stanza Details for more information.
zap yes Additional procedures for a more complete uninstall, including user files and shared resources.
See Zap Stanza Details for more information.
appcast no URL providing an appcast feed to find updates for this Cask.
See Appcast Stanza Details for more information.
depends_on yes List of dependencies and requirements for this Cask.
See Depends_on Stanza Details for more information.
conflicts_with yes List of conflicts with this Cask (not yet functional).
See Conflicts_with Stanza Details for more information.
caveats yes String or Ruby block providing the user with Cask-specific information at install time.
See Caveats Stanza Details for more information.
livecheck no Ruby block describing how to find updates for this Cask.
See Livecheck Stanza Details for more information.
preflight yes Ruby block containing preflight install operations (needed only in very rare cases).
postflight yes Ruby block containing postflight install operations.
See Postflight Stanza Details for more information.
uninstall_preflight yes Ruby block containing preflight uninstall operations (needed only in very rare cases).
uninstall_postflight yes Ruby block containing postflight uninstall operations.
language required Ruby block, called with language code parameters, containing other stanzas and/or a return value.
See Language Stanza Details for more information.
container nested: no Relative path to an inner container that must be extracted before moving on with the installation. This allows us to support dmg inside tar, zip inside dmg, etc.
container type: no Symbol to override container-type autodetect. May be one of: :air , :bz2 , :cab , :dmg , :generic_unar , :gzip , :otf , :pkg , :rar , :seven_zip , :sit , :tar , :ttf , :xar , :zip , :naked . (Example: parse.rb)
auto_updates no true . Assert the Cask artifacts auto-update. Use if Check for Updates… or similar is present in app menu, but not if it only opens a webpage and does not do the download and installation for you.

Stanza descriptions

Stanza: app

In the simple case of a string argument to app , the source file is moved to the target /Applications directory. For example:

Источник

Читайте также:  Rdp клиент для windows 10 обновить
Оцените статью