is in there.
for example) extracting archive file on /home/foo.
- archive file supposed 'gast-0.1.0.tar.gz'
+ archive file supposed 'gast-0.1.2.tar.gz'
$ cd /home/foo
- $ tar -xvzf /tmp/gast-0.1.0.tar.gz
- gast-0.1.0/
- gast-0.1.0/gast
- gast-0.1.0/gast_make
- gast-0.1.0/gast_rpmbuild
- gast-0.1.0/README.ja_JP.UTF-8
+ $ tar -xvzf /tmp/gast-0.1.2.tar.gz
+ gast-0.1.2/
+ gast-0.1.2/gast
+ gast-0.1.2/gast_make
+ gast-0.1.2/gast_rpmbuild
+ gast-0.1.2/README.ja_JP.UTF-8
[ setup ]
Change a working directory to an extracted directory, and execte
each scripts with no argument.
Symbolic link file are created at same directory.
- $ cd /home/foo/gast-0.1.0
+ $ cd /home/foo/gast-0.1.2
$ ./gast
gast : Create symbolic link 'gcc'
gast : Create symbolic link 'cc'
+ gast : Create symbolic link 'g++'
$ ./gast_make
gast_make : Create symbolic link 'make'
Example) get temporary files of kernel build on CentOS
+------------------------------------------------------------------
- |$ /home/foo/gast-0.1.0/rpmbuild --save-temps-dir /home/foo/tmp \
+ |$ /home/foo/gast-0.1.2/rpmbuild --save-temps-dir /home/foo/tmp \
| --rebuild /tmp/kernel-2.6.18-92.1.10.el5.src.rpm
+------------------------------------------------------------------
| $ export GAST_CONTENT_UNIQUE=
| $
| $ # do build
- | $ PATH=/home/foo/gast-0.1.0:${PATH} make
+ | $ PATH=/home/foo/gast-0.1.2:${PATH} make
| :
| :
| $ make install
Below is an another example:
+------------------------------------------------------------------
|$ GAST_ENABLE= GAST_SOURCE_DIR=/tmp GAST_SAVE_DIR=/home/foo/tmp \
- |> GAST_CONTENT_WITHOUT_H= PATH=/home/foo/gast-0.1.0:$PATH \
+ |> GAST_CONTENT_WITHOUT_H= PATH=/home/foo/gast-0.1.2:$PATH \
|> gcc test.c
+------------------------------------------------------------------
... confusing.
【インストール】
本プロジェクトの成果物は、tar + gzip 形式で配布されます。 この
- ファイルを適当なディレクトリ配下で解凍・展開すると、gast-0.1.0
+ ファイルを適当なディレクトリ配下で解凍・展開すると、gast-0.1.2
というディレクトリが作成され、その配下に成果物であるスクリプトが
配置されます。 この展開されたことを以って、インストール完了と
します(不要となった圧縮ファイルは削除してください)。
<オペレーション>:以降の例では、/home/foo 配下にインストールすると
仮定します。
- プロジェクト成果物は /tmp/gast-0.1.0.tar.gz で
+ プロジェクト成果物は /tmp/gast-0.1.2.tar.gz で
配布されるものと仮定します。
$ cd /home/foo
- $ tar -xvzf /tmp/gast-0.1.0.tar.gz
- gast-0.1.0/
- gast-0.1.0/gast
- gast-0.1.0/gast_make
- gast-0.1.0/gast_rpmbuild
- gast-0.1.0/README.ja_JP.UTF-8
+ $ tar -xvzf /tmp/gast-0.1.2.tar.gz
+ gast-0.1.2/
+ gast-0.1.2/gast
+ gast-0.1.2/gast_make
+ gast-0.1.2/gast_rpmbuild
+ gast-0.1.2/README.ja_JP.UTF-8
【セットアップ】
スクリプトが配置されているディレクトリに移動し、各スクリプトを
自身の別名となるシンボリックリンクを同一ディレクトリ内に作成しま
す。
- $ cd /home/foo/gast-0.1.0
+ $ cd /home/foo/gast-0.1.2
$ ./gast
gast : Create symbolic link 'gcc'
gast : Create symbolic link 'cc'
+ gast : Create symbolic link 'g++'
$ ./gast_make
gast_make : Create symbolic link 'make'
rpmbuild (=gast_rpmbuild の別名)スクリプトを、直接起動してください。
例)Linux カーネルの srpm のビルドの際、中間ファイルを抽出する。
- $ /home/foo/gast-0.1.0/rpmbuild --save-temps-dir /home/foo/tmp \
+ $ /home/foo/gast-0.1.2/rpmbuild --save-temps-dir /home/foo/tmp \
--recompile /tmp/kernel-2.6.18-92.1.10.el5.src.rpm
オプションの指定方法は、通常の rpmbuild コマンドと変わりません。
$ export GAST_CONTENT_UNIQUE=
$
$ # ビルド
- $ PATH=/home/foo/gast-0.1.0:${PATH} make
+ $ PATH=/home/foo/gast-0.1.2:${PATH} make
:
:
$ make install
また、以下のような実施方法もあります(コマンド列が長くて面倒ですが)。
$ GAST_ENABLE= GAST_SOURCE_DIR=/tmp GAST_SAVE_DIR=/home/foo/tmp \
- > GAST_CONTENT_WITHOUT_H= PATH=/home/foo/gast-0.1.0:$PATH \
+ > GAST_CONTENT_WITHOUT_H= PATH=/home/foo/gast-0.1.2:$PATH \
> gcc test.c
いろいろ使ってみてください。
# temporary file is same as one of some previous stored files,
# this script does preserve current temporary file.
-VERSION="0.1.1"
+VERSION="0.1.2"
ORIGINAL_NAME="gast"
CWD=`pwd`
SCRIPT_NAME=${0##*/}
#----------------------------------------------------------------------
# (I am weak in English. Please modify English comment more suitable. :T.K)
-VERSION=0.1.1
+VERSION=0.1.2
ORIGINAL_NAME="gast_make"
CWD=`pwd`
SCRIPT_NAME=${0##*/}
#----------------------------------------------------------------------
# (I am weak in English. Please modify English comment more suitable. :T.K)
-VERSION=0.1.1
+VERSION=0.1.2
ORIGINAL_NAME="gast_rpmbuild"
SCRIPT_NAME=${0##*/}
SCRIPT_PATH=${0%/*}