mirror of
https://gitee.com/TarsCloud/TarsCpp.git
synced 2024-12-22 22:16:38 +08:00
update bat sh
This commit is contained in:
parent
ac7c68ec0f
commit
70e41b2486
9
examples/scripts/run-all.sh
Executable file
9
examples/scripts/run-all.sh
Executable file
@ -0,0 +1,9 @@
|
||||
#!/bin/bash
|
||||
|
||||
echo "run-all.sh"
|
||||
|
||||
sh ../examples/scripts/run-quick-start.sh
|
||||
sh ../examples/scripts/run-http.sh
|
||||
sh ../examples/scripts/run-co.sh
|
||||
sh ../examples/scripts/run-push.sh
|
||||
|
@ -1,57 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
if [ $# -lt 3 ]
|
||||
then
|
||||
echo "<Usage: $0 App Server Servant>"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
APP=$1
|
||||
SERVER=$2
|
||||
SERVANT=$3
|
||||
|
||||
if [ "$SERVER" == "$SERVANT" ]
|
||||
then
|
||||
echo "Error!(ServerName == ServantName)"
|
||||
exit -1
|
||||
fi
|
||||
|
||||
if [ ! -d $APP/$SERVER ]
|
||||
then
|
||||
echo "[mkdir: $APP/$SERVER]"
|
||||
mkdir -p $APP/$SERVER
|
||||
fi
|
||||
|
||||
echo "[create server: $APP.$SERVER ...]"
|
||||
|
||||
DEMO_PATH=/usr/local/taf/cpp/script/demo
|
||||
|
||||
make cleanall -C $DEMO_PATH
|
||||
|
||||
cp $DEMO_PATH/* $APP/$SERVER/
|
||||
|
||||
cd $APP/$SERVER/
|
||||
|
||||
SRC_FILE="DemoServer.h DemoServer.cpp DemoServantImp.h DemoServantImp.cpp DemoServant.jce makefile"
|
||||
|
||||
for FILE in $SRC_FILE
|
||||
do
|
||||
cat $FILE | sed "s/DemoServer/$SERVER/g" > $FILE.tmp
|
||||
mv $FILE.tmp $FILE
|
||||
|
||||
cat $FILE | sed "s/DemoApp/$APP/g" > $FILE.tmp
|
||||
mv $FILE.tmp $FILE
|
||||
|
||||
cat $FILE | sed "s/DemoServant/$SERVANT/g" > $FILE.tmp
|
||||
mv $FILE.tmp $FILE
|
||||
done
|
||||
|
||||
mv DemoServer.h ${SERVER}.h
|
||||
mv DemoServer.cpp ${SERVER}.cpp
|
||||
mv DemoServantImp.h ${SERVANT}Imp.h
|
||||
mv DemoServantImp.cpp ${SERVANT}Imp.cpp
|
||||
mv DemoServant.jce ${SERVANT}.jce
|
||||
|
||||
cd ../../
|
||||
|
||||
echo "[done.]"
|
1
servant/script/create_tars_server.bat
Normal file
1
servant/script/create_tars_server.bat
Normal file
@ -0,0 +1 @@
|
||||
c:\\taf\\cpp\\script\\busybox.exe bash c:\\taf\\cpp\\script\\win_create.bat %1 %2 %3
|
Loading…
Reference in New Issue
Block a user