projects
/
anna.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Allow to be executed from other path
[anna.git]
/
example
/
diameter
/
launcher
/
DEPLOY.sh
diff --git
a/example/diameter/launcher/DEPLOY.sh
b/example/diameter/launcher/DEPLOY.sh
index
fbb72dc
..
04361e2
100755
(executable)
--- a/
example/diameter/launcher/DEPLOY.sh
+++ b/
example/diameter/launcher/DEPLOY.sh
@@
-20,8
+20,8
@@
createRunScript () {
echo "#!/bin/bash" > run.sh
echo "EXE=\`cat .exe 2>/dev/null\`" >> run.sh
echo "#!/bin/bash" > run.sh
echo "EXE=\`cat .exe 2>/dev/null\`" >> run.sh
- echo "STARTED=\`p
s -fea | grep \"\$EXE\" | grep -v grep
\`" >> run.sh
- echo "[ \
"\$EXE\" != \"\" -a \"\$STARTED\" != \"\" ] && { echo \"Already started!\"; echo \"\$STARTED\" ; exit
; }" >> run.sh
+ echo "STARTED=\`p
grep \$EXE2>/dev/null
\`" >> run.sh
+ echo "[ \
$? -eq 0 ] && { echo \"Already started!\"; echo \"\$STARTED\" ; exit 1
; }" >> run.sh
echo "./pre-start.sh" >> run.sh
echo "> launcher.traces" >> run.sh
echo "EXE=\"./ADL-launcher\"" >> run.sh
echo "./pre-start.sh" >> run.sh
echo "> launcher.traces" >> run.sh
echo "EXE=\"./ADL-launcher\"" >> run.sh
@@
-65,6
+65,7
@@
createDictionaryPaths () {
#############
# EXECUTION #
#############
#############
# EXECUTION #
#############
+cd `dirname $0`
echo
echo "---------------------------------------"
echo "Anna Diameter Launcher (ADL) deployment"
echo
echo "---------------------------------------"
echo "Anna Diameter Launcher (ADL) deployment"
@@
-72,18
+73,18
@@
echo "---------------------------------------"
echo
echo "Input deployment path [$DPATH_dflt]:"
read DPATH
echo
echo "Input deployment path [$DPATH_dflt]:"
read DPATH
-[
[ "$DPATH" = "" ]
] && DPATH=$DPATH_dflt
-[
[ -d $DPATH ]
] && _exit "The path '$DPATH' already exists. Remove it before continue..."
+[
"$DPATH" = ""
] && DPATH=$DPATH_dflt
+[
-d $DPATH
] && _exit "The path '$DPATH' already exists. Remove it before continue..."
echo "Basic checkings ..."
echo "Basic checkings ..."
-[
[ ! -f $EXEC ]
] && _exit "Anna Diameter Launcher (ADL) is not linked. Execute 'scons' for 'anna' suite."
-[
[ ! -d $SETUPS_DIR ]
] && _exit "Diameter stacks not found ($SETUPS_DIR). Perhaps you executed this script out of its parent path."
+[
! -f $EXEC
] && _exit "Anna Diameter Launcher (ADL) is not linked. Execute 'scons' for 'anna' suite."
+[
! -d $SETUPS_DIR
] && _exit "Diameter stacks not found ($SETUPS_DIR). Perhaps you executed this script out of its parent path."
echo
echo "Deploy (f)ull version or (l)ite version [l]:"
read deploy_type
echo
echo "Deploy (f)ull version or (l)ite version [l]:"
read deploy_type
-[
[ "$deploy_type" = "" ]
] && deploy_type=l
-[
[ "$deploy_type" = "l" ]
] && RESOURCES_DIR=resources_lite
+[
"$deploy_type" = ""
] && deploy_type=l
+[
"$deploy_type" = "l"
] && RESOURCES_DIR=resources_lite
echo "Copying ..."
mkdir -p $DPATH
echo "Copying ..."
mkdir -p $DPATH
@@
-100,7
+101,7
@@
cp $DCTDTD $DPATH/DTDs
echo "Preparing ..."
cd $DPATH
echo "Preparing ..."
cd $DPATH
-[
[ "$deploy_type" != "l" ]
] && createRunScript
+[
"$deploy_type" != "l"
] && createRunScript
createDictionaryPaths
cd - >/dev/null
createDictionaryPaths
cd - >/dev/null