Trying to reduce the number of duplicate commands in the shell files.
This commit is contained in:
parent
d0907134ef
commit
101d4522fa
29
run-linux
29
run-linux
|
@ -7,21 +7,24 @@ rm -f ./Gosora
|
||||||
echo "Generating the dynamic code"
|
echo "Generating the dynamic code"
|
||||||
go generate
|
go generate
|
||||||
|
|
||||||
echo "Building the router generator"
|
runBuilder()
|
||||||
cd ./router_gen
|
{
|
||||||
go build -o RouterGen
|
PATH=$1
|
||||||
mv ./RouterGen ..
|
BINNAME=$2
|
||||||
cd ..
|
shift;shift;
|
||||||
echo "Running the router generator"
|
WHATIS=$@
|
||||||
./RouterGen
|
|
||||||
|
|
||||||
echo "Building the query generator"
|
echo "Building the $WHATIS generator"
|
||||||
cd ./query_gen
|
cd $PATH
|
||||||
go build -o QueryGen
|
go build -o $BINNAME
|
||||||
mv ./QueryGen ..
|
mv "./$BINNAME" ..
|
||||||
cd ..
|
cd ..
|
||||||
echo "Running the query generator"
|
echo "Running the $WHATIS generator"
|
||||||
./QueryGen
|
./$BINNAME
|
||||||
|
}
|
||||||
|
|
||||||
|
runBuilder ./router_gen RouterGen router
|
||||||
|
runBuilder ./query_gen QueryGen query
|
||||||
|
|
||||||
echo "Building Gosora"
|
echo "Building Gosora"
|
||||||
go build -o Gosora
|
go build -o Gosora
|
||||||
|
|
Loading…
Reference in New Issue