X-Git-Url: https://git.teslayout.com/public/public/public/?a=blobdiff_plain;f=example%2Fdiameter%2Flauncher%2FDEPLOY_setups.sh;h=dab557dd39e99d4cf6f2cb49465c49a0d9fd09d3;hb=907f89f943e0b56e3ab0cc066bd1dd9d80d823a5;hp=b050efd7f49d0e83e0f42e0fce616b30e2c6c81d;hpb=daeeaacceeccefcac46838f460b19409cc5c4cb4;p=anna.git diff --git a/example/diameter/launcher/DEPLOY_setups.sh b/example/diameter/launcher/DEPLOY_setups.sh index b050efd..dab557d 100755 --- a/example/diameter/launcher/DEPLOY_setups.sh +++ b/example/diameter/launcher/DEPLOY_setups.sh @@ -18,27 +18,45 @@ _exit() { ############# # EXECUTION # ############# +type=$1 +target=$2 + +echo +echo " ----------------------------" +echo " SETUPS DEPLOYMENT AUTOMATION" +echo " ----------------------------" +echo +echo "-----------------------------------------------------------" +echo "Usage: $0 [type] [target_directory]" +echo +echo " type:" +echo " 1. Client and server" +echo " 2. Ft-client and server" +echo " 3. St-client and servers" +echo +echo " target_directory:" echo -echo "Which one you want to deploy [1]:" +echo " Non existing directory to install the stuff" echo -echo " 1. Client and server" -echo " 2. Ft-client and server" -echo " 3. St-client and server" +echo "-----------------------------------------------------------" echo -read type +[ "$type" = "" ] && { echo "Which one you want to deploy [1]:" ; read type ; } [ "$type" = "" ] && type=1 case $type in 1) + echo "Selected Client-Server" DEPLOY_DIR__dflt=$HOME/ADML-clientAndServer ;; 2) + echo "Selected Client-Server FT" DEPLOY_DIR__dflt=$HOME/ADML-ftclientAndServer ;; 3) - DEPLOY_DIR__dflt=$HOME/ADML-stclientAndServer + echo "Selected Client-Servers ST" + DEPLOY_DIR__dflt=$HOME/ADML-stclientAndServers ;; *) @@ -46,38 +64,59 @@ case $type in exit 1 ;; esac - echo -echo "Directory for deploy [$DEPLOY_DIR__dflt]:" -read DIR -[ "$DIR" = "" ] && DIR=$DEPLOY_DIR__dflt -[ -d $DIR ] && _exit "The directory '$DIR' already exists !" + + +[ "$target" = "" ] && { echo "Directory for deploy [$DEPLOY_DIR__dflt]:" ; read target ; } +[ "$target" = "" ] && target=$DEPLOY_DIR__dflt +[ -d $target ] && _exit "The directory '$target' already exists !" +echo "Target directory: $target" case $type in 1) - $DEPLOY_SCR b $DIR/client - $DEPLOY_SCR b $DIR/server - cd $DIR/client - echo c | ./configure.sh + $DEPLOY_SCR b $target/ADML-client + $DEPLOY_SCR b $target/ADML-server + echo "Configuring ..." + cd $target/ADML-client + echo c | ./configure.sh >/dev/null cd - >/dev/null - cd $DIR/server - echo s | ./configure.sh + cd $target/ADML-server + echo s | ./configure.sh >/dev/null cd - >/dev/null ;; 2) - $DEPLOY_SCR f $DIR/ft-client - $DEPLOY_SCR b $DIR/server - cd $DIR/server - echo s | ./configure.sh + $DEPLOY_SCR f $target/ADML-ft-client + $DEPLOY_SCR b $target/ADML-server + echo "Configuring ..." + cd $target/ADML-server + echo s | ./configure.sh >/dev/null cd - >/dev/null ;; 3) - $DEPLOY_SCR s $DIR/st-client - $DEPLOY_SCR b $DIR/server - cd $DIR/server - echo s | ./configure.sh + $DEPLOY_SCR s $target/ADML-st-client + $DEPLOY_SCR b $target/ADML-serverGx + $DEPLOY_SCR b $target/ADML-serverRx + echo "Configuring ..." +# cd $target/ADML-st-client +# ln -s services_example services +# mv run.sh .run-one.sh +# mv run_all.sh run.sh +# mv operation.sh .operation-one.sh +# mv operation_all.sh operation.sh +# rm dictionary.xml +# cd - >/dev/null + cd $target/ADML-serverGx + echo s | ./configure.sh >/dev/null + sed -i 's/3868/3869/' services.xml + # Gx dictionary: + ln -sf stacks/other_examples/16777238.xml dictionary.xml + cd - >/dev/null + cd $target/ADML-serverRx + echo s | ./configure.sh >/dev/null + # Rx dictionary: + ln -sf stacks/other_examples/16777236.xml dictionary.xml cd - >/dev/null ;; esac