ユーザ用ツール

サイト用ツール



最近の更新




タグ一覧

タグ#
1
1
1
1
1
1
1
1
1
1
tools:gettext:インストール:0.21

gettextをソースからインストール

手順

$ wget https://ftp.gnu.org/gnu/gettext/gettext-0.21.tar.gz
$ tar xvf gettext-0.21.tar.gz
$ cd gettext-0.21/
$ mkdir build
$ cd build
$ ../configure --prefix=/opt/gettext/0.21
$ make
$ make install

環境変数

$ export PATH=/opt/gettext/0.21/bin:${PATH}
$ export LD_LIBRARY_PATH=/opt/gettext/0.21/lib:${LD_LIBRARY_PATH}

スクリプト

#!/bin/bash

#############################################################
inst_ver=0.21
inst_target=/opt/gettext/${inst_ver}
arch_file="gettext-"${inst_ver}".tar.gz"
target_web="https://ftp.gnu.org/gnu/gettext/"${arch_file}
working_dir=$(cd $(dirname $0); pwd)/gettext-${inst_ver}
#############################################################

mkdir -p ${inst_target} 
if [ $? -ne 0 ];
then
    echo "You do not have write permission on "${inst_target}"."
    echo "Scipt is aborted."
    exit 1
fi

rm -rf ${arch_file} ${working_dir}

wget ${target_web}
if [ $? -ne 0 ];
then
    echo "command is failed"
    echo "wget ${target_web}"
    exit 1
fi
mkdir ${working_dir}
tar xvf ${arch_file} -C ${working_dir} --strip-components 1
cd ${working_dir}
mkdir -p build
cd build
../configure --prefix=${inst_target}
make
make install
tools/gettext/インストール/0.21.txt · 最終更新: 2021/01/14 06:56 by michiya