LoginSignup
15
15

More than 5 years have passed since last update.

apt-cyg をインストールする(2016年版)

Last updated at Posted at 2016-09-12

Windows上で cygwin を使っているが、setupメニューでパッケージインストールするのは、面倒だしバッチ処理ができずに不便だ。そこで apt-cyg を導入した。

Windows10ならば cygwin をやめて Bash on Ubuntu on Windows を使えば apt-get が使えるのはわかっているが、それはまた別の話。

Qiita上には、すでにいくつか記事があって参考にしたが、公式リポジトリの情報が古かったり、githubからcloneで取ってくる事例が見当たらず、改行コードで嵌ったので、覚え書きとして記事にした。

導入方針

  • cygwinターミナルの上で github から clone し、バージョンアップへの追随を git pull で可能にする.

手順

# cygwinターミナルを開き、リポジトリをクローンする.
# 公式は transcode-open だが、野良も含めて多数の fork あり.
# 下記の「参考記事」に紹介されているので、お好みのリポジトリを選べば良い.
git clone https://github.com/transcode-open/apt-cyg.git
cd apt-cyg/

# gitの改行コード設定を、Windows環境にあわせてCRLFにしている場合は,
# 改行コードLFでapt-cygを再取得する.
git config core.autocrlf input
rm -f apt-cyg
git reset --hard

# apt-cygをPATH上に置く.
install apt-cyg /usr/local/bin

# 国内のcygwinリポジトリを登録する.
apt-cyg -m ftp://ftp.iij.ad.jp/pub/cygwin/ update

# 以後は、バージョンアップのタイミングで下記を実行する.
cd apt-cyg/
git pull
install apt-cyg /usr/local/bin

参考記事

http://seesaawiki.jp/w/kou1okada/d/apt-cyg
http://qiita.com/tkzwyk/items/24ac4d55a3a1d8951708
http://qiita.com/FSMS/items/68b5956301d987d1be2b

15
15
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
15
15