Update get_functions.sh
This commit is contained in:
parent
e116682f9f
commit
144dab4794
@ -1,35 +1,42 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
#TODO golang sed nem mukodik
|
|
||||||
#TODO python3 kornyezetet hozzaadni es szukseg szerint mas kornyezeteket
|
#TODO python3 kornyezetet hozzaadni es szukseg szerint mas kornyezeteket
|
||||||
|
# a function mappaban levo fajlokra meghivja a deploy_function.sh scriptet ugy,
|
||||||
|
# hogy a fuggveny neve a fajl neve kiterjesztes nelkul, es a handle neve a fajlban levo fuggveny neve
|
||||||
|
#TODO lehetne majd irni hozzairni hogy ha tobb func van egy fajlban akkor egy alapertelmezetett ad meg handle-kent
|
||||||
|
|
||||||
for x in *; do
|
for x in *; do
|
||||||
|
|
||||||
if [ $x != "deploy_function.sh" ]; then
|
if [ $x = 'deploy_function.sh' ]; then
|
||||||
|
continue
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ $x = 'get_functions.sh' ]; then
|
||||||
|
continue
|
||||||
|
fi
|
||||||
|
|
||||||
echo "Deploying $x"
|
echo "Deploying $x"
|
||||||
|
|
||||||
ispython=$(echo $x | grep .py)
|
ispython=$(echo $x | grep .py)
|
||||||
#ispython3=$(cat $x | grep python3)
|
#ispython3=$(cat $x | grep python3)
|
||||||
isgolang=$(echo $x | grep .go)
|
isgolang=$(echo $x | grep .go)
|
||||||
|
|
||||||
|
if [ ! $ispython = "" ]; then
|
||||||
#if [ -n $ispython3 ]; then
|
|
||||||
# handle=$( cat $x | grep def | sed 's/def \(.*\)(/\1/')
|
|
||||||
# funcname=$( echo $x | sed 's/\(.*\)\.py/\1/')
|
|
||||||
# #sh deploy_function.sh python3.6 $x $funcname $handle
|
|
||||||
# echo "$x $funcname $handle"
|
|
||||||
# echo "python3"
|
|
||||||
if [ -n $ispython ]; then
|
|
||||||
handle=$( cat $x | grep def | sed 's/def \(.*\)(.*/\1/' )
|
handle=$( cat $x | grep def | sed 's/def \(.*\)(.*/\1/' )
|
||||||
funcname=$( echo $x | sed 's/\(.*\)\.py/\1/')
|
funcname=$( echo $x | sed 's/\(.*\)\.py/\1/')
|
||||||
#sh deploy_function.sh python2.7 $x $funcname $handle
|
sh deploy_function.sh python2.7 $x $funcname $handle
|
||||||
echo "$x $funcname $handle"
|
echo "file name: $x"
|
||||||
elif [ -n $isgolang ]; then
|
echo "function name: $funcname"
|
||||||
handle=$( cat $x | grep 'func ' | sed 's/func \(.*\)(.*/\1/') #TODO debugging
|
echo "handle name: $handle"
|
||||||
funcname=$( echo $x | sed 's/\(.*\)\./\1/')
|
elif [ ! $isgolang = "" ]; then
|
||||||
#sh deploy_function.sh go1.10 $x $funcname $handle
|
echo "goo handle elott: $x"
|
||||||
echo "$x $funcname $handle"
|
handle=$( cat $x | grep 'func ' | sed 's/func \(.*\)(.*(.*/\1/' )
|
||||||
fi
|
funcname=$( echo $x | sed 's/\(.*\)\.go/\1/')
|
||||||
|
sh deploy_function.sh go1.10 $x $funcname $handle
|
||||||
|
echo "file name: $x"
|
||||||
|
echo "function name: $funcname"
|
||||||
|
echo "handle name: $handle"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
done
|
done
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user