2011年7月22日金曜日

ps2gif

#!/bin/sh
pstopnm -stdout $1 | pnmrotate -90 | ppmtogif > ${1%.*}.gif

2011年7月10日日曜日

git の設定

手元のディレクトリ(text)を新たにリモート側にレポジトリを作ってプッシュする。

リモートサーバ
まずは、リモートサーバにgit のレポジトリを用意

> mkdir text.git
> chdir text.git
> git --bare init --shared

ローカル側のディレクトリをレポジトリとして初期化

> cd text
> git init

ローカルレポジトリに追加してコミット

> git add .
> git commit -m "initial commit"

ローカルとリモートを接続

> git remote add origin ssh://example.com/home/yourname/text.git

このとき自分のホームからの相対パスではなく、フルパスで指定するところがポイント。

で、プッシュ

> git push origin master

別のマシンで作業するときには

git clone ssh://example.com/home/yourname/text.git

とすればよい。