LoginSignup
26
27

More than 5 years have passed since last update.

Windows用のコマンドラインインストーラScoop

Last updated at Posted at 2015-04-25

scoopのインストール

PowerShellを開き、署名されていないPowerShellスクリプトの実行権限を変更。scoopをインストール。

PS> set-executionpolicy unrestricted -s cu
PS> iex (new-object net.webclient).downloadstring('https://get.scoop.sh')

以降の操作はPowerShellでなくても良い。

gitをインストールしてみる

デフォルトでインストールできるアプリの一覧 https://github.com/lukesampson/scoop/tree/master/bucket

例えばgitをインストールするなら、

> scoop install git

とする。git本体は%LOCALAPPDATA%\scoop\apps\gitに展開され、%LOCALAPPDATA%\scoop\shimsというディレクトリにgit.exe, git.ps1, git.shimというファイルができる。これらはAliasというかショートカット的なもののようだ。なお、このショートカット的なもののみを提供するshimexeというのもある。

gvimをインストールしてみる

標準のbucketにCUI版のvimしか入っていない。gvimはbucket-extrasに入っているのでこれを使えるようにする。

> scoop bucket add extras
checking repo...ok
...
extras bucket was added successfully

> scoop bucket list
extras
> scoop install gvim
installing gvim (7.4)
...
gvim (7.4) was installed successfully!

status, update

scoop updateでscoop自体とbucketsのアップデートを行う。scoop update アプリ名またはscoop update *で各アプリのアップデートを行う。

> scoop status
scoop is out of date. run scoop update to get the latest changes.
everything is ok!

> scoop update
updating scoop...
updating extras bucket...
scoop was updated successfully!

> scoop status
scoop is up-to-date.
updates are available for:
    nodejs: 0.12.1 -> 0.12.2

> scoop update nodejs
(ログ流しちゃった)
nodejs was updated from 0.12.1 to 0.12.2

Chocolateyとの違い

新たなアプリをscoopを使ってインストールしたい場合、必要なのはマニフェストと呼ばれる1つのJSONファイルだけで、それをローカルにおいてもgithubやgist上においても良い。bucketも、単にマニフェストを置いたgithubのリポジトリなので簡単に作れる。

たまに%PATH%を書き換えるので、コマンドプロンプトを起動しなおす必要がある。

26
27
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
26
27