YUKI Hiroshi
null+****@clear*****
Fri Sep 26 15:17:49 JST 2014
YUKI Hiroshi 2014-09-26 15:17:49 +0900 (Fri, 26 Sep 2014) New Revision: d33e5169b7e89a1a68504cc381d68c6041391fbc https://github.com/droonga/droonga-engine/commit/d33e5169b7e89a1a68504cc381d68c6041391fbc Message: Use service script for the installed version Modified files: install.sh Modified: install.sh (+11 -3) =================================================================== --- install.sh 2014-09-26 15:12:43 +0900 (3ab8d9e) +++ install.sh 2014-09-26 15:17:49 +0900 (ac85d1d) @@ -34,7 +34,7 @@ # # curl https://raw.githubusercontent.com/droonga/droonga-engine/master/install.sh | HOST=xxx.xxx.xxx.xxx bash NAME=droonga-engine -SCRIPT_URL=https://raw.githubusercontent.com/droonga/$NAME/master/install +SCRIPT_URL_BASE=https://raw.githubusercontent.com/droonga/$NAME REPOSITORY_URL=https://github.com/droonga/$NAME.git USER=$NAME GROUP=droonga @@ -160,6 +160,14 @@ determine_hostname() { return 1 } +script_url() { + if [ "$VERSION" = "master" ]; then + echo "$SCRIPT_URL_BASE/master/$1" + else + echo "$SCRIPT_URL_BASE/v$($NAME --version)/$1" + fi +} + install_rroonga() { # Install Rroonga globally from a public gem, because custom build @@ -223,7 +231,7 @@ register_service_in_debian() { mkdir -p $pid_dir chown -R $USER:$GROUP $pid_dir - curl -o /etc/init.d/$NAME $SCRIPT_URL/debian/$NAME + curl -o /etc/init.d/$NAME $(script_url "install/debian/$NAME") chmod +x /etc/init.d/$NAME update-rc.d $NAME defaults } @@ -251,7 +259,7 @@ register_service_in_centos() { mkdir -p $pid_dir chown -R $USER:$GROUP $pid_dir - curl -o /etc/rc.d/init.d/$NAME $SCRIPT_URL/centos/$NAME + curl -o /etc/rc.d/init.d/$NAME $(script_url "install/centos/$NAME") chmod +x /etc/rc.d/init.d/$NAME /sbin/chkconfig --add $NAME } -------------- next part -------------- HTML����������������������������... Download