Easy to use: not have to install software, only compile as debug.
[anna.git] / example / diameter / launcher / DEPLOY.sh
index e4593be..4a29575 100755 (executable)
@@ -5,7 +5,8 @@ SETUPS_DIR=../../../source/diameter/stack/setups
 MSGDTD=../../../include/anna/diameter/codec/message.dtd
 DCTDTD=../../../include/anna/diameter/stack/dictionary.dtd
 BASE_PROT=commands_baseProtocol.xml
-EXEC=/opt/bin/anna/example_diameter_launcher
+#EXEC=/opt/bin/anna/example_diameter_launcher
+EXEC=./debug/example_diameter_launcher
 DPATH_dflt=$HOME/ADL
 
 _exit () {
@@ -21,9 +22,9 @@ createRunScript () {
   echo "EXE=\`cat .exe 2>/dev/null\`" >> run.sh
   echo "STARTED=\`ps -fea | grep \"\$EXE\" | grep -v grep\`" >> run.sh
   echo "[ \"\$EXE\" != \"\" -a \"\$STARTED\" != \"\" ] && { echo \"Already started!\"; echo \"\$STARTED\" ; exit ; }" >> run.sh
-  echo "pre-start.sh" >> run.sh
+  echo "./pre-start.sh" >> run.sh
   echo "> launcher.traces" >> run.sh
-  echo "EXE=\"ADL-launcher\"" >> run.sh
+  echo "EXE=\"./ADL-launcher\"" >> run.sh
   echo "echo \$EXE > .exe"  >> run.sh
   echo >> run.sh
   echo -n "\$EXE " >> run.sh
@@ -72,7 +73,8 @@ read DPATH
 [[ -d $DPATH ]] && _exit "The path '$DPATH' already exists. Remove it before continue..."
 
 echo "Basic checkings ..."
-[[ ! -f $EXEC ]] && _exit "Anna Diameter Launcher (ADL) is not installed in the system. Execute 'sudo scons install' for 'anna' suite."
+#[[ ! -f $EXEC ]] && _exit "Anna Diameter Launcher (ADL) is not installed in the system. Execute 'sudo scons install' for 'anna' suite."
+[[ ! -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 "Copying ..."
@@ -82,6 +84,7 @@ cp $EXEC $DPATH/ADL-launcher
 cp resources/* $DPATH
 cp $SETUPS_DIR/*xml $DPATH/stacks
 cp $SETUPS_DIR/*sh $DPATH/stacks
+cp $SETUPS_DIR/readme.txt $DPATH/stacks
 cp $MSGDTD $DPATH
 cp $DCTDTD $DPATH
 
@@ -93,9 +96,9 @@ cd - >/dev/null
 
 # Help:
 echo
-echo "Stacks available at '.dictionary__<stack description>', create a symbolic link from '.dictionary'."
-echo "That link points now to an QoS application dictionary. Template for xml messages (message.dtd) and"
-echo " dictionaries (dictionary.dtd) are informative, not actually required by process. Start with 'run.sh'."
+echo "Go to '$DPATH' and see README file"
+echo
+echo "Done!"
 echo
 echo