mirror of
https://port.numenaute.org/aleajactaest/khanat-code-old.git
synced 2024-11-29 15:16:01 +00:00
Fixed: all path are now relative. Only have to define $RYZOM_PATH
This commit is contained in:
parent
2f5a5ba161
commit
263405c224
17 changed files with 67 additions and 58 deletions
|
@ -1,8 +1,8 @@
|
||||||
MAKE_NIGHT_ARGS=-j10
|
MAKE_NIGHT_ARGS=-j2
|
||||||
MAKE_ALL_ARGS=-j2
|
MAKE_ALL_ARGS=-j2
|
||||||
CXX=g++
|
CXX=g++
|
||||||
CC=g++
|
CC=g++
|
||||||
BIN_DIR=$(HOME)/code/ryzom/tools/scripts/linux
|
BIN_DIR=$(RYZOM_PATH)/tools/scripts/linux
|
||||||
|
|
||||||
night:
|
night:
|
||||||
+make $(MAKE_NIGHT_ARGS) -k -C common night CXX=$(CXX)
|
+make $(MAKE_NIGHT_ARGS) -k -C common night CXX=$(CXX)
|
||||||
|
|
|
@ -20,12 +20,12 @@ FLAGS_DBG_off = -O3 -funroll-loops -DNL_RELEASE
|
||||||
DIR_DBG_on = debug
|
DIR_DBG_on = debug
|
||||||
DIR_DBG_off = release
|
DIR_DBG_off = release
|
||||||
|
|
||||||
PACK_SHEETS_FLAGS = -A/home/nevrax/code/ryzom/server -L/home/nevrax/code/ryzom/server -C/home/nevrax/code/ryzom/server/sheet_pack_cfg -Q --nons
|
PACK_SHEETS_FLAGS = -A$RYZOM_PATH/server -L$RYZOM_PATH/server -C$RYZOM_PATH//server/sheet_pack_cfg -Q --nons
|
||||||
|
|
||||||
NEL_PATH = $(HOME)/code/install/$(DIR_DBG_$(DBG))
|
|
||||||
RYZOM_PATH = $(HOME)/code/ryzom
|
|
||||||
|
|
||||||
NEL_INCLUDE = $(HOME)/code/nel/include
|
NEL_PATH = $(RYZOM_PATH)/../../code/install/$(DIR_DBG_$(DBG))
|
||||||
|
|
||||||
|
NEL_INCLUDE = $(RYZOM_PATH)/../../code/nel/include
|
||||||
RYZOM_COMMON_SRC = $(RYZOM_PATH)/common/src
|
RYZOM_COMMON_SRC = $(RYZOM_PATH)/common/src
|
||||||
|
|
||||||
ifeq (Objects.mk,$(wildcard Objects.mk))
|
ifeq (Objects.mk,$(wildcard Objects.mk))
|
||||||
|
|
|
@ -16,8 +16,8 @@ LUALDFLAGS = $(shell lua-config --libs)
|
||||||
CXXFLAGS = $(WWWFLAGS) $(LUAFLAGS) \
|
CXXFLAGS = $(WWWFLAGS) $(LUAFLAGS) \
|
||||||
$(FLAGS_CMN) $(FLAGS_DBG_$(DBG)) \
|
$(FLAGS_CMN) $(FLAGS_DBG_$(DBG)) \
|
||||||
-I/usr/include/libxml2 \
|
-I/usr/include/libxml2 \
|
||||||
-I$(HOME)/code/luabind \
|
-I$(RYZOM_PATH)/../../code/luabind \
|
||||||
-I$(HOME)/code/nel/include \
|
-I$(NEL_PATH)/include \
|
||||||
-I$(RYZOM_PATH)/common/src \
|
-I$(RYZOM_PATH)/common/src \
|
||||||
-I$(RYZOM_PATH)/client/src/seven_zip \
|
-I$(RYZOM_PATH)/client/src/seven_zip \
|
||||||
-I.. \
|
-I.. \
|
||||||
|
|
|
@ -9,7 +9,7 @@ include ../../../Variables.mk
|
||||||
|
|
||||||
# The flags for the C++ compiler
|
# The flags for the C++ compiler
|
||||||
CXXFLAGS = $(FLAGS_CMN) $(FLAGS_DBG_$(DBG)) \
|
CXXFLAGS = $(FLAGS_CMN) $(FLAGS_DBG_$(DBG)) \
|
||||||
-I$(HOME)/code/nel/include \
|
-I$(NEL_PATH)/include \
|
||||||
-I$(RYZOM_PATH)/common/src \
|
-I$(RYZOM_PATH)/common/src \
|
||||||
-I.. \
|
-I.. \
|
||||||
-I.
|
-I.
|
||||||
|
|
|
@ -10,7 +10,7 @@ include ../../../Variables.mk
|
||||||
# The flags for the C++ compiler
|
# The flags for the C++ compiler
|
||||||
CXXFLAGS = $(FLAGS_CMN) $(FLAGS_DBG_$(DBG)) \
|
CXXFLAGS = $(FLAGS_CMN) $(FLAGS_DBG_$(DBG)) \
|
||||||
-D_SZ_ONE_DIRECTORY \
|
-D_SZ_ONE_DIRECTORY \
|
||||||
-I$(HOME)/code/nel/include \
|
-I$(NEL_PATH)/include \
|
||||||
-I$(RYZOM_PATH)/common/src \
|
-I$(RYZOM_PATH)/common/src \
|
||||||
-I.. \
|
-I.. \
|
||||||
-I.
|
-I.
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
MAKE_NIGHT_ARGS=-j10
|
MAKE_NIGHT_ARGS=-j2
|
||||||
MAKE_ALL_ARGS=-j2
|
MAKE_ALL_ARGS=-j2
|
||||||
CXX=g++
|
CXX=g++
|
||||||
CC=g++
|
CC=g++
|
||||||
BIN_DIR=$(HOME)/code/ryzom/tools/scripts/linux
|
BIN_DIR=$(RYZOM_PATH)/tools/scripts/linux
|
||||||
|
|
||||||
night:
|
night:
|
||||||
+make $(MAKE_NIGHT_ARGS) -k -C src night CXX=$(CXX)
|
+make $(MAKE_NIGHT_ARGS) -k -C src night CXX=$(CXX)
|
||||||
|
|
|
@ -11,8 +11,8 @@ include ../../../Variables.mk
|
||||||
CXXFLAGS = $(FLAGS_CMN) $(FLAGS_DBG_$(DBG)) \
|
CXXFLAGS = $(FLAGS_CMN) $(FLAGS_DBG_$(DBG)) \
|
||||||
-I/usr/include/libxml2 \
|
-I/usr/include/libxml2 \
|
||||||
-I/usr/include/mysql \
|
-I/usr/include/mysql \
|
||||||
-I$(HOME)/code/nel/include \
|
-I$(NEL_INCLUDE) \
|
||||||
-I$(HOME)/code/ryzom/common/src \
|
-I$(RYZOM_PATH)/common/src \
|
||||||
-I./ \
|
-I./ \
|
||||||
-I./character_structure \
|
-I./character_structure \
|
||||||
-I./egs_sheets \
|
-I./egs_sheets \
|
||||||
|
@ -20,7 +20,7 @@ CXXFLAGS = $(FLAGS_CMN) $(FLAGS_DBG_$(DBG)) \
|
||||||
-I./game_item_manager
|
-I./game_item_manager
|
||||||
|
|
||||||
# The flags for the linker
|
# The flags for the linker
|
||||||
LDFLAGS = $(LD_FLAGS_CMN) -L$(HOME)/install/$(DIR_DBG_$(DBG))/lib \
|
LDFLAGS = $(LD_FLAGS_CMN) -L$(RYZOM_PATH)/install/$(DIR_DBG_$(DBG))/lib \
|
||||||
-llibmysqlclient \
|
-llibmysqlclient \
|
||||||
-lnelnet \
|
-lnelnet \
|
||||||
-lnelgeorges \
|
-lnelgeorges \
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
MAKE_NIGHT_ARGS=-j10
|
MAKE_NIGHT_ARGS=-j2
|
||||||
MAKE_ALL_ARGS=-j2
|
MAKE_ALL_ARGS=-j2
|
||||||
CXX=g++
|
CXX=g++
|
||||||
CC=g++
|
CC=g++
|
||||||
BIN_DIR=$(HOME)/code/ryzom/tools/scripts/linux
|
BIN_DIR=$(RYZOM_PATH)/tools/scripts/linux
|
||||||
|
|
||||||
night:
|
night:
|
||||||
+make $(MAKE_NIGHT_ARGS) -k -C src night CXX=$(CXX)
|
+make $(MAKE_NIGHT_ARGS) -k -C src night CXX=$(CXX)
|
||||||
|
|
|
@ -20,13 +20,12 @@ LDFLAGS = $(LD_FLAGS_CMN) \
|
||||||
-lxml2
|
-lxml2
|
||||||
|
|
||||||
# The flags for the linker
|
# The flags for the linker
|
||||||
LDFLAGS2 = -L$(HOME)/install/$(DIR_DBG_$(DBG))/lib \
|
LDFLAGS2 = -L$(RYZOM_PATH)/install/$(DIR_DBG_$(DBG))/lib \
|
||||||
-lnelnet \
|
-lnelnet \
|
||||||
-lnelgeorges \
|
-lnelgeorges \
|
||||||
-lnelpacs \
|
-lnelpacs \
|
||||||
-L/usr/lib \
|
-L/usr/lib \
|
||||||
-L/usr/X11R6/lib \
|
-L/usr/X11R6/lib \
|
||||||
-L$(HOME)/cvs/code/ryzom/src_v2/game_share \
|
|
||||||
-lnelmisc \
|
-lnelmisc \
|
||||||
-lxml2 \
|
-lxml2 \
|
||||||
-lstlport \
|
-lstlport \
|
||||||
|
|
|
@ -26,12 +26,11 @@ LDFLAGS = $(LD_FLAGS_CMN) \
|
||||||
-ldl
|
-ldl
|
||||||
|
|
||||||
# The flags for the linker
|
# The flags for the linker
|
||||||
LDFLAGS2 = -L$(HOME)/install/$(DIR_DBG_$(DBG))/lib \
|
LDFLAGS2 = -L$(RYZOM_PATH)/install/$(DIR_DBG_$(DBG))/lib \
|
||||||
-lnelnet \
|
-lnelnet \
|
||||||
-lxml2 \
|
-lxml2 \
|
||||||
-L/usr/lib \
|
-L/usr/lib \
|
||||||
-L/usr/X11R6/lib \
|
-L/usr/X11R6/lib \
|
||||||
-L$(HOME)/cvs/code/ryzom/src_v2/game_share \
|
|
||||||
-lc \
|
-lc \
|
||||||
-lgame_share \
|
-lgame_share \
|
||||||
-lnelgeorges \
|
-lnelgeorges \
|
||||||
|
|
|
@ -11,8 +11,8 @@ include ../../../Variables.mk
|
||||||
CXXFLAGS = $(FLAGS_CMN) $(FLAGS_DBG_$(DBG)) \
|
CXXFLAGS = $(FLAGS_CMN) $(FLAGS_DBG_$(DBG)) \
|
||||||
-I/usr/include/libxml2 \
|
-I/usr/include/libxml2 \
|
||||||
-I/usr/include/mysql \
|
-I/usr/include/mysql \
|
||||||
-I$(HOME)/code/nel/include \
|
-I$(NEL_INCLUDE) \
|
||||||
-I$(HOME)/code/ryzom/common/src \
|
-I$(RYZOM_PATH)/common/src \
|
||||||
-I./ \
|
-I./ \
|
||||||
-I./character_structure \
|
-I./character_structure \
|
||||||
-I./egs_sheets \
|
-I./egs_sheets \
|
||||||
|
@ -20,7 +20,7 @@ CXXFLAGS = $(FLAGS_CMN) $(FLAGS_DBG_$(DBG)) \
|
||||||
-I./game_item_manager
|
-I./game_item_manager
|
||||||
|
|
||||||
# The flags for the linker
|
# The flags for the linker
|
||||||
LDFLAGS = $(LD_FLAGS_CMN) -L$(HOME)/install/$(DIR_DBG_$(DBG))/lib \
|
LDFLAGS = $(LD_FLAGS_CMN) -L$(RYZOM_PATH)/install/$(DIR_DBG_$(DBG))/lib \
|
||||||
-llibmysqlclient \
|
-llibmysqlclient \
|
||||||
-lnelnet \
|
-lnelnet \
|
||||||
-lnelgeorges \
|
-lnelgeorges \
|
||||||
|
|
0
code/ryzom/server/src/update_cxxpath_flags.sh
Normal file → Executable file
0
code/ryzom/server/src/update_cxxpath_flags.sh
Normal file → Executable file
5
code/ryzom/server/src/update_packed_sheets.sh
Normal file → Executable file
5
code/ryzom/server/src/update_packed_sheets.sh
Normal file → Executable file
|
@ -1,4 +1,4 @@
|
||||||
#! /bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
# make sure the args are valid
|
# make sure the args are valid
|
||||||
if [ $# -lt 2 ]
|
if [ $# -lt 2 ]
|
||||||
|
@ -25,7 +25,8 @@ done
|
||||||
# if one of the files was missing then call the executable to rebuild the packed sheets
|
# if one of the files was missing then call the executable to rebuild the packed sheets
|
||||||
if [ $REQUIRE_REBUILD == 1 ]
|
if [ $REQUIRE_REBUILD == 1 ]
|
||||||
then
|
then
|
||||||
PACK_SHEETS_FLAGS=$(grep PACK_SHEETS_FLAGS ../../../Variables.mk|cut -f2 -d=)
|
PACK_SHEETS_FLAGS=`grep PACK_SHEETS_FLAGS ../../../Variables.mk|cut -f2 -d=`
|
||||||
|
PACK_SHEETS_FLAGS=`eval echo $PACK_SHEETS_FLAGS`
|
||||||
echo "$EXE_NAME $PACK_SHEETS_FLAGS"
|
echo "$EXE_NAME $PACK_SHEETS_FLAGS"
|
||||||
$EXE_NAME $PACK_SHEETS_FLAGS
|
$EXE_NAME $PACK_SHEETS_FLAGS
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -45,11 +45,15 @@
|
||||||
# VARIABLES
|
# VARIABLES
|
||||||
|
|
||||||
#MAKE_ARGS="-j20 CC=distcc CXX=distcc"
|
#MAKE_ARGS="-j20 CC=distcc CXX=distcc"
|
||||||
MAKE_ARGS="-j4"
|
MAKE_ARGS="-j2"
|
||||||
|
|
||||||
# Set the source directory. Use the environment SRC_DIR variable, if it's
|
# Set the source directory. Use the environment SRC_DIR variable, if it's
|
||||||
# not set, use $HOME/cvs as a default value
|
# not set, use $HOME/cvs as a default value
|
||||||
SRC_DIR="$HOME/code"
|
if test X"$RYZOM_PATH" = "X"
|
||||||
|
then
|
||||||
|
RYZOM_PATH="$HOME/code"
|
||||||
|
fi
|
||||||
|
SRC_DIR="$RYZOM_PATH/../../code"
|
||||||
|
|
||||||
# Build diretories
|
# Build diretories
|
||||||
BUILD_DEBUG="$SRC_DIR/build/debug"
|
BUILD_DEBUG="$SRC_DIR/build/debug"
|
||||||
|
@ -60,7 +64,6 @@ INSTALL_DEBUG="$SRC_DIR/install/debug"
|
||||||
INSTALL_RELEASE="$SRC_DIR/install/release"
|
INSTALL_RELEASE="$SRC_DIR/install/release"
|
||||||
|
|
||||||
# PKG config
|
# PKG config
|
||||||
#STLPORT_DIR='/home/installs/STLport-4.5.1'
|
|
||||||
STLPORT_DIR='/usr'
|
STLPORT_DIR='/usr'
|
||||||
PYTHON_VERSION=2
|
PYTHON_VERSION=2
|
||||||
|
|
||||||
|
@ -74,10 +77,10 @@ CONFIGURE_OPT="--disable-xmltest --enable-maintainer-mode"
|
||||||
###########################################################################
|
###########################################################################
|
||||||
|
|
||||||
# Flag files associated to each mode
|
# Flag files associated to each mode
|
||||||
DEBUG_FILE="$HOME/.mode_debug"
|
DEBUG_FILE="$RYZOM_PATH/.mode_debug"
|
||||||
STATIC_FILE="$HOME/.mode_static"
|
STATIC_FILE="$RYZOM_PATH/.mode_static"
|
||||||
DYNAMIC_FILE="$HOME/.mode_dynamic"
|
DYNAMIC_FILE="$RYZOM_PATH/.mode_dynamic"
|
||||||
SILENT_FILE="$HOME/.mode_silent"
|
SILENT_FILE="$RYZOM_PATH/.mode_silent"
|
||||||
|
|
||||||
# Specify the source code directory of each projects
|
# Specify the source code directory of each projects
|
||||||
NEL_SRC="$SRC_DIR/nel"
|
NEL_SRC="$SRC_DIR/nel"
|
||||||
|
@ -346,7 +349,7 @@ case $1 in
|
||||||
init)
|
init)
|
||||||
BUILD_ARG=$2
|
BUILD_ARG=$2
|
||||||
|
|
||||||
buildmode
|
$RYZOM_PATH/tools/scripts/linux/buildmode
|
||||||
|
|
||||||
case "$BUILD_ARG" in
|
case "$BUILD_ARG" in
|
||||||
|
|
||||||
|
@ -374,7 +377,6 @@ case $1 in
|
||||||
|
|
||||||
# Run the configure script
|
# Run the configure script
|
||||||
cd $BUILD_DIR/$BUILD_ARG
|
cd $BUILD_DIR/$BUILD_ARG
|
||||||
echo CFLAGS="$BUILD_CFLAGS" CXXFLAGS="$BUILD_CXXFLAGS"
|
|
||||||
CFLAGS="$BUILD_CFLAGS" CXXFLAGS="$BUILD_CXXFLAGS" \
|
CFLAGS="$BUILD_CFLAGS" CXXFLAGS="$BUILD_CXXFLAGS" \
|
||||||
$SRC_DIR/$BUILD_ARG/configure $CONFIGURE_OPT $* || exit 1
|
$SRC_DIR/$BUILD_ARG/configure $CONFIGURE_OPT $* || exit 1
|
||||||
;;
|
;;
|
||||||
|
|
|
@ -4,11 +4,11 @@
|
||||||
###########################################################################
|
###########################################################################
|
||||||
|
|
||||||
# Files associated to each mode
|
# Files associated to each mode
|
||||||
DEBUG_FILE=$HOME/.mode_debug
|
DEBUG_FILE=$RYZOM_PATH/.mode_debug
|
||||||
#RELEASE_FILE=$HOME/.mode_release
|
#RELEASE_FILE=$RYZOM_PATH/.mode_release
|
||||||
STATIC_FILE=$HOME/.mode_static
|
STATIC_FILE=$RYZOM_PATH/.mode_static
|
||||||
DYNAMIC_FILE=$HOME/.mode_dynamic
|
DYNAMIC_FILE=$RYZOM_PATH/.mode_dynamic
|
||||||
SILENT_FILE=$HOME/.mode_silent
|
SILENT_FILE=$RYZOM_PATH/.mode_silent
|
||||||
|
|
||||||
|
|
||||||
###########################################################################
|
###########################################################################
|
||||||
|
|
|
@ -1,6 +1,13 @@
|
||||||
#!/bin/sh -
|
#!/bin/sh -
|
||||||
|
|
||||||
RYZOM_PATH="$HOME/code/ryzom"
|
#export RYZOM_PATH="$HOME/code/ryzom"
|
||||||
|
|
||||||
|
if [ X"$RYZOM_PATH" = "X" ]
|
||||||
|
then
|
||||||
|
echo Error: You need to setup \$RYZOM_PATH environement variable with the path where the ryzom code is
|
||||||
|
echo For example: export RYZOM_PATH=\"/home/user/code/ryzom\"
|
||||||
|
exit
|
||||||
|
fi
|
||||||
|
|
||||||
. $RYZOM_PATH/tools/scripts/linux/utilities
|
. $RYZOM_PATH/tools/scripts/linux/utilities
|
||||||
|
|
||||||
|
|
|
@ -1,14 +1,14 @@
|
||||||
#!/bin/sh
|
#!/bin/sh -
|
||||||
|
|
||||||
SSH_AGENT_FILE="$HOME/ssh_agent_file"
|
SSH_AGENT_FILE="$HOME/ssh_agent_file"
|
||||||
|
|
||||||
BASENAME=`basename $0`
|
BASENAME=`basename $0`
|
||||||
LOG_INFO="$HOME/log/${BASENAME}_info.log"
|
LOG_INFO="$RYZOM_PATH/log/${BASENAME}_info.log"
|
||||||
LOG_ERROR="$HOME/log/${BASENAME}_error.log"
|
LOG_ERROR="$RYZOM_PATH/log/${BASENAME}_error.log"
|
||||||
|
|
||||||
# first param is the subject line
|
# first param is the subject line
|
||||||
# others params are email
|
# others params are email
|
||||||
function send_mail()
|
send_mail()
|
||||||
{
|
{
|
||||||
SUBJECT=$1
|
SUBJECT=$1
|
||||||
shift
|
shift
|
||||||
|
@ -16,13 +16,13 @@ function send_mail()
|
||||||
cat $LOG_ERROR | mail -s "$SUBJECT on `hostname`" $*
|
cat $LOG_ERROR | mail -s "$SUBJECT on `hostname`" $*
|
||||||
}
|
}
|
||||||
|
|
||||||
function print_success()
|
print_success()
|
||||||
{
|
{
|
||||||
echo "*********************** $* SUCCESS !"
|
echo "*********************** $* SUCCESS !"
|
||||||
echo
|
echo
|
||||||
}
|
}
|
||||||
|
|
||||||
function print_failure()
|
print_failure()
|
||||||
{
|
{
|
||||||
echo "***************************************************"
|
echo "***************************************************"
|
||||||
echo "***************************************************"
|
echo "***************************************************"
|
||||||
|
@ -34,7 +34,7 @@ function print_failure()
|
||||||
|
|
||||||
# failed fill the log and send email if necessary
|
# failed fill the log and send email if necessary
|
||||||
# argument are the error message
|
# argument are the error message
|
||||||
function failed()
|
failed()
|
||||||
{
|
{
|
||||||
print_failure $*
|
print_failure $*
|
||||||
if [ "X$LOG_INFO" != "X" ]
|
if [ "X$LOG_INFO" != "X" ]
|
||||||
|
@ -59,7 +59,7 @@ function failed()
|
||||||
|
|
||||||
# useful function to avoid continuing if something goes wrong
|
# useful function to avoid continuing if something goes wrong
|
||||||
# first param is $? and second is the string that will display
|
# first param is $? and second is the string that will display
|
||||||
function verify()
|
verify()
|
||||||
{
|
{
|
||||||
if [ $1 -eq 0 ]
|
if [ $1 -eq 0 ]
|
||||||
then
|
then
|
||||||
|
@ -80,7 +80,7 @@ function verify()
|
||||||
}
|
}
|
||||||
|
|
||||||
# step_failed() fills the log and increments $STEPS_FAILURES
|
# step_failed() fills the log and increments $STEPS_FAILURES
|
||||||
function step_failed()
|
step_failed()
|
||||||
{
|
{
|
||||||
print_failure $*
|
print_failure $*
|
||||||
if [ "X$LOG_INFO" != "X" ]
|
if [ "X$LOG_INFO" != "X" ]
|
||||||
|
@ -102,7 +102,7 @@ function step_failed()
|
||||||
|
|
||||||
# call init_steps() before you use step()
|
# call init_steps() before you use step()
|
||||||
# it takes a label for following steps as parameter
|
# it takes a label for following steps as parameter
|
||||||
function init_steps()
|
init_steps()
|
||||||
{
|
{
|
||||||
STEPS_LABEL="$*"
|
STEPS_LABEL="$*"
|
||||||
STEPS_FAILURES=0
|
STEPS_FAILURES=0
|
||||||
|
@ -110,7 +110,7 @@ function init_steps()
|
||||||
|
|
||||||
# like verify() but will continue even if step failed until verify_steps() is called
|
# like verify() but will continue even if step failed until verify_steps() is called
|
||||||
# first param is $? and second is the string that will display
|
# first param is $? and second is the string that will display
|
||||||
function step()
|
step()
|
||||||
{
|
{
|
||||||
if [ $1 -eq 0 ]
|
if [ $1 -eq 0 ]
|
||||||
then
|
then
|
||||||
|
@ -131,7 +131,7 @@ function step()
|
||||||
}
|
}
|
||||||
|
|
||||||
# call verify_steps() when you want to stop if error(s) occured in previous steps
|
# call verify_steps() when you want to stop if error(s) occured in previous steps
|
||||||
function verify_steps()
|
verify_steps()
|
||||||
{
|
{
|
||||||
if [ $STEPS_FAILURES -eq 0 ]
|
if [ $STEPS_FAILURES -eq 0 ]
|
||||||
then
|
then
|
||||||
|
@ -154,7 +154,7 @@ function verify_steps()
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
function ask_confirmation()
|
ask_confirmation()
|
||||||
{
|
{
|
||||||
echo "Using this script will destroy the current version, type 'yes' if you really want to do that"
|
echo "Using this script will destroy the current version, type 'yes' if you really want to do that"
|
||||||
read CONF
|
read CONF
|
||||||
|
@ -163,7 +163,7 @@ function ask_confirmation()
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
function check_host()
|
check_host()
|
||||||
{
|
{
|
||||||
HOST=`hostname -s`
|
HOST=`hostname -s`
|
||||||
if [ "X$HOST" != "X$1" ]; then
|
if [ "X$HOST" != "X$1" ]; then
|
||||||
|
@ -172,10 +172,11 @@ function check_host()
|
||||||
}
|
}
|
||||||
|
|
||||||
# useful function to initialize the default log for all scripts
|
# useful function to initialize the default log for all scripts
|
||||||
function init()
|
init()
|
||||||
{
|
{
|
||||||
if [ "X$LOG_INFO" != "X" ]
|
if [ "X$LOG_INFO" != "X" ]
|
||||||
then
|
then
|
||||||
|
test -d `dirname $LOG_INFO` || mkdir -p `dirname $LOG_INFO`
|
||||||
test ! -f $LOG_INFO || rm $LOG_INFO
|
test ! -f $LOG_INFO || rm $LOG_INFO
|
||||||
touch $LOG_INFO
|
touch $LOG_INFO
|
||||||
# display all ulimit in the log
|
# display all ulimit in the log
|
||||||
|
@ -184,12 +185,13 @@ function init()
|
||||||
|
|
||||||
if [ "X$LOG_ERROR" != "X" ]
|
if [ "X$LOG_ERROR" != "X" ]
|
||||||
then
|
then
|
||||||
|
test -d `dirname $LOG_ERROR` || mkdir -p `dirname $LOG_ERROR`
|
||||||
test ! -f $LOG_ERROR || rm $LOG_ERROR
|
test ! -f $LOG_ERROR || rm $LOG_ERROR
|
||||||
touch $LOG_ERROR
|
touch $LOG_ERROR
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
function init_ssh()
|
init_ssh()
|
||||||
{
|
{
|
||||||
if [ ! -f $SSH_AGENT_FILE ]
|
if [ ! -f $SSH_AGENT_FILE ]
|
||||||
then
|
then
|
||||||
|
@ -197,5 +199,4 @@ function init_ssh()
|
||||||
fi
|
fi
|
||||||
|
|
||||||
eval `cat $SSH_AGENT_FILE`
|
eval `cat $SSH_AGENT_FILE`
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue