YUKI Hiroshi
null+****@clear*****
Wed Sep 17 10:27:19 JST 2014
YUKI Hiroshi 2014-09-17 10:27:19 +0900 (Wed, 17 Sep 2014) New Revision: 2fcfb08c1ffabfe9403b49aea610a4894b09cfb9 https://github.com/droonga/droonga-http-server/commit/2fcfb08c1ffabfe9403b49aea610a4894b09cfb9 Message: Extract logc to detect a repository is available or not Modified files: install.sh Modified: install.sh (+5 -1) =================================================================== --- install.sh 2014-09-17 10:18:01 +0900 (d05e31e) +++ install.sh 2014-09-17 10:27:19 +0900 (a43a129) @@ -54,6 +54,10 @@ exist_command() { type "$1" > /dev/null 2>&1 } +exist_yum_repository() { + yum "$1" | grep --quiet epel +} + exist_user() { id "$1" > /dev/null 2>&1 } @@ -238,7 +242,7 @@ install_in_debian() { } install_in_centos() { - if ! yum repolist | grep --quiet epel; then + if ! exist_yum_repository epel; then # epel-release is not installed, so install it. yum -y install epel-release # however, we should disable it by default because. -------------- next part -------------- HTML����������������������������... Download