LoginSignup
4
3

More than 5 years have passed since last update.

plenv や perl-build をさっくりアップデートする

Posted at

こんばんは。いよいよ年の瀬という趣になってきましたが,みなさんはいかがおすごしでしょうか。わたしはまだ大掃除やっていないので面倒だなぁこまったなぁと思っているところです。

さて,みなさんは plenv や perl-build のアップデート (追随),どうしていますか?
各ディレクトリに移動して git pull する,でしょうか。でも,ひとつひとつのディレクトリに移動して git pull するの,めんどうですね (ということにしてください)。

今回ご紹介する plenv-update を使えば,ワンステップで各プロダクトをアップデートできます。

インストール

以下のようにして ~/.plenv/plugins/ 以下にプラグインをチェックアウトします。

$ git clone https://github.com/dayflower/plenv-update.git ~/.plenv/plugins/plenv-update

実行

あとは plenv update と入力するだけです。

$ plenv update
updating plenv
 |  Already on 'master'
 |  From git://github.com/tokuhirom/plenv
 |  * branch            master     -> FETCH_HEAD
 |  Already up-to-date.

updating perl-build
 |  Already on 'master'
 |  From git://github.com/tokuhirom/Perl-Build
 |  * branch            master     -> FETCH_HEAD
 |  Already up-to-date.

updating plenv-update
 |  Already on 'master'
 |  From https://github.com/dayflower/plenv-update
 |  * branch            master     -> FETCH_HEAD
 |  Already up-to-date.

ああら簡単,すべての plenv プロダクトがアップデートされました。
(ごめんなさい,手元だとすべてすでに最新版でした)

解説

plenv には rbenv と同等の plugin system があります。

そして,この plenv-update は rbenv-updateパクリ plenv への移植です。

rbenv にはほかにも沢山のプラグインがあります。いくつかは plenv 用に移植できるかもしれませんね。

4
3
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
4
3