diff --git a/evt-tools.py b/evt-tools.py index c3a5e0f..ab4963d 100644 --- a/evt-tools.py +++ b/evt-tools.py @@ -97,7 +97,7 @@ class EvtTools: def build_webrtc(self): if self.check_for_link(): - subprocess.run([(SH + " build_webrtc" % SH)], shell=True) + subprocess.run([(SH + " build_webrtc")], shell=True) def build_webrtc_release_ubuntu(self): if self.check_for_link(): diff --git a/scripts/Link.py b/scripts/Link.py index 01f1659..3f9d15d 100644 --- a/scripts/Link.py +++ b/scripts/Link.py @@ -58,17 +58,19 @@ class Link: # for d in subdirs: # if d == "evio": # self.dir_path = os.path.join(root, d) - os.chdir("~/workspace/EdgeVPNIO") + pwd = os.getcwd()[0:] + os.chdir(os.getenv("HOME") + "/workspace/EdgeVPNIO") if path.exists("evio"): self.dir_path = os.getcwd()[0:] else: git.Git(self.dir_path).clone("https://github.com/EdgeVPNio/evio.git") - self.evio_repo = git.Repo(self.dir_path+"evio") + self.evio_repo = git.Repo(str(self.dir_path) + "/evio") #print("Evio Branch name:" + str(self.evio_repo.active_branch)) self.dir_path_tools = "~/workspace/EdgeVPNIO/tools" self.tools_repo = git.Repo(self.dir_path_tools) #print("Tools Branch name:" + str(self.tools_repo.active_branch)) + os.chdir(str(pwd)) def main(self): self.sync("20.7.2") diff --git a/scripts/evtool-v20.7.2 b/scripts/evtool-v20.7.2 index 34fa9b3..5cad343 100755 --- a/scripts/evtool-v20.7.2 +++ b/scripts/evtool-v20.7.2 @@ -4,6 +4,10 @@ EVIO=https://github.com/EdgeVPNio/evio.git EXLIBS=https://github.com/ipop-project/3rd-Party-Libs.git PY=python3.8 WorkspaceRoot=~/workspace +Build_WRTC=./EdgeVPNIO/tools/scripts/build_webrtc.sh +Get_Archives=./EdgeVPNIO/tools/scripts/get_archives.sh +Get_Include=./EdgeVPNIO/tools/scripts/get_include.sh +Build_Tincan=./EdgeVPNIO/tools/build_tincan.sh function install_build_tools { sudo bash -c " @@ -142,89 +146,93 @@ function do_clean cd $wd } -function build_webrtc +function build_webrtc() { wd=$(pwd) cd $WorkspaceRoot - chmod +x ./tools/scripts/build_webrtc.sh ./tools/scripts/get_archives.sh ./tools/scripts/get_include.sh - tools/scripts/build_webrtc.sh -b debug -t ubuntu - cd $WorkspaceRoot - tools/scripts/get_archives.sh -b debug -t ubuntu - cd $WorkspaceRoot - tools/scripts/get_include.sh -b debug -t ubuntu + chmod +x $Build_WRTC $Get_Archives $Get_Include + if ! $Build_WRTC -b "$1" -t "$2" + then + cd $WorkspaceRoot + if ! $Get_Archives -b "$1" -t "$2" + then + cd $WorkspaceRoot + $Get_Include -b "$1" -t "$2" + fi + fi cd $wd } -function build_webrtc_with_release_ubuntu -{ +#function build_webrtc_with_release_ubuntu +#{ +# wd=$(pwd) +# cd $WorkspaceRoot +# chmod +x $Build_WRTC $Get_Archives $Get_Include +# $Build_WRTC -b release -t ubuntu +# cd $WorkspaceRoot +# $Get_Archives -b release -t ubuntu +# cd $WorkspaceRoot +# $Get_Include -b release -t ubuntu +# cd $wd +#} +# +#function build_webrtc_with_debug_raspberry_pi +#{ +# wd=$(pwd) +# cd $WorkspaceRoot +# chmod +x $Build_WRTC $Get_Archives $Get_Include +# ./EdgeVPNIO/tools/scripts/build_webrtc.sh -b debug -t raspberry-pi +# cd $WorkspaceRoot +# ./EdgeVPNIO/tools/scripts/get_archives.sh -b debug -t raspberry-pi +# cd $WorkspaceRoot +# ./EdgeVPNIO/tools/scripts/get_include.sh -b debug -t raspberry-pi +# cd $wd +#} +# +#function build_webrtc_with_release_raspberry_pi +#{ +# wd=$(pwd) +# cd $WorkspaceRoot +# chmod +x $Build_WRTC $Get_Archives $Get_Include +# ./EdgeVPNIO/tools/scripts/build_webrtc.sh -b release -t raspberry-pi +# cd $WorkspaceRoot +# ./EdgeVPNIO/tools/scripts/get_archives.sh -b release -t raspberry-pi +# cd $WorkspaceRoot +# ./EdgeVPNIO/tools/scripts/get_include.sh -b release -t raspberry-pi +# cd $wd +#} + +function build_tincan() { wd=$(pwd) cd $WorkspaceRoot - chmod +x ./tools/scripts/build_webrtc.sh ./tools/scripts/get_archives.sh ./tools/scripts/get_include.sh - ./tools/scripts/build_webrtc.sh -b release -t ubuntu - cd $WorkspaceRoot - ./tools/scripts/get_archives.sh -b release -t ubuntu - cd $WorkspaceRoot - ./tools/scripts/get_include.sh -b release -t ubuntu + chmod +x $Build_Tincan + $Build_Tincan -b "$1" -t "$2" cd $wd } -function build_webrtc_with_debug_raspberry_pi -{ - wd=$(pwd) - cd $WorkspaceRoot - chmod +x ./tools/scripts/build_webrtc.sh ./tools/scripts/get_archives.sh ./tools/scripts/get_include.sh - ./tools/scripts/build_webrtc.sh -b debug -t raspberry-pi - cd $WorkspaceRoot - ./tools/scripts/get_archives.sh -b debug -t raspberry-pi - cd $WorkspaceRoot - ./tools/scripts/get_include.sh -b debug -t raspberry-pi - cd $wd -} - -function build_webrtc_with_release_raspberry_pi -{ - wd=$(pwd) - cd $WorkspaceRoot - chmod +x ./tools/scripts/build_webrtc.sh ./tools/scripts/get_archives.sh ./tools/scripts/get_include.sh - ./tools/scripts/build_webrtc.sh -b release -t raspberry-pi - cd $WorkspaceRoot - ./tools/scripts/get_archives.sh -b release -t raspberry-pi - cd $WorkspaceRoot - ./tools/scripts/get_include.sh -b release -t raspberry-pi - cd $wd -} - -function build_tincan { - wd=$(pwd) - cd $WorkspaceRoot - chmod +x ./tools/build_tincan.sh - ./tools/scripts/build_tincan.sh -b debug -t ubuntu - cd $wd -} - -function build_tincan_release_ubuntu { - wd=$(pwd) - cd $WorkspaceRoot - chmod +x ./tools/build_tincan.sh - ./tools/scripts/build_tincan.sh -b release -t ubuntu - cd $wd -} - -function build_tincan_debug_raspberry { - wd=$(pwd) - cd $WorkspaceRoot - chmod +x ./tools/build_tincan.sh - ./tools/scripts/build_tincan.sh -b debug -t raspberry-pi - cd $wd -} - -function build_tincan_release_raspberry { - wd=$(pwd) - cd $WorkspaceRoot - chmod +x ./tools/build_tincan.sh - ./tools/scripts/build_tincan.sh -b debug -t raspberry-pi - cd $wd -} +#function build_tincan_release_ubuntu { +# wd=$(pwd) +# cd $WorkspaceRoot +# chmod +x ./EdgeVPNIO/tools/build_tincan.sh +# ./EdgeVPNIO/tools/scripts/build_tincan.sh -b release -t ubuntu +# cd $wd +#} +# +#function build_tincan_debug_raspberry { +# wd=$(pwd) +# cd $WorkspaceRoot +# chmod +x ./EdgeVPNIO/tools/build_tincan.sh +# ./EdgeVPNIO/tools/scripts/build_tincan.sh -b debug -t raspberry-pi +# cd $wd +#} +# +#function build_tincan_release_raspberry { +# wd=$(pwd) +# cd $WorkspaceRoot +# chmod +x ./EdgeVPNIO/tools/build_tincan.sh +# ./EdgeVPNIO/tools/scripts/build_tincan.sh -b debug -t raspberry-pi +# cd $wd +#} function do_full_setup { @@ -264,28 +272,28 @@ case $1 in do_clean ;; build_webrtc) - build_webrtc + build_webrtc debug ubuntu ;; build_webrtc_with_release_ubuntu) - build_webrtc_with_release_ubuntu + build_webrtc release ubuntu ;; build_webrtc_with_debug_raspberry_pi) - build_webrtc_with_debug_raspberry_pi + build_webrtc debug raspberry-pi ;; build_webrtc_with_release_raspberry_pi) - build_webrtc_with_release_raspberry_pi + build_webrtc release raspberry-pi ;; build_tincan) - build_tincan + build_tincan debug ubuntu ;; build_tincan_release_ubuntu) - build_tincan_release_ubuntu + build_tincan release ubuntu ;; build_tincan_debug_raspberry) - build_tincan_debug_raspberry + build_tincan debug raspberry-pi ;; build_tincan_release_raspberry) - build_tincan_release_raspberry + build_tincan release raspberry-pi ;; all) do_full_setup