From 6a6de9074ce45da680e2d590c431a900496265b5 Mon Sep 17 00:00:00 2001 From: Captain ALM Date: Fri, 19 Mar 2021 10:03:39 +0000 Subject: [PATCH] Update build and install scripts. Use force as an argument with ./install to force a re-installation of simple-vpn (Don't forget to press y and enter when prompted\! ) --- README.md | 6 +++--- build | 10 +++------- build-source | 4 ---- install | 8 ++++++++ install-dependencies | 17 ++++++++++++++++- 5 files changed, 30 insertions(+), 15 deletions(-) delete mode 100755 build-source create mode 100755 install diff --git a/README.md b/README.md index be87e07..18e3b8e 100644 --- a/README.md +++ b/README.md @@ -4,9 +4,9 @@ A GUI client for [simple-vpn](/sean/simple-vpn) ## Installing -Run `./build` to build for debian otherwise you will just have to figure out what to do. +Run `./install` to build for Debian / GNU + Linux, otherwise you will just have to figure out what to do. ## Other operating systems - - Doesn't work for Windows - - No idea about mac + - Doesn't work for Windows (LOL) + - No idea about mac (:#) diff --git a/build b/build index 9f537ee..c92f1fa 100755 --- a/build +++ b/build @@ -1,8 +1,4 @@ #!/bin/bash -echo "[info] Preparing to setup dependencies" -./install-dependencies -echo "[info] Preparing to build projects from source" -./build-source -echo "[info] Preparing to install components" -./install-components -echo "[info] Build process finished" +# Just build all projects with msbuild +echo "Preparing to build MelonVPN" +msbuild MelonVPN.sln -m /t:MelonVPNCore /t:MelonVPNConnectedClientUpdate /t:MelonVPNDaemon /t:MelonVPNClient /p:Configuration=Release /p:Platform=x86 diff --git a/build-source b/build-source deleted file mode 100755 index c92f1fa..0000000 --- a/build-source +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/bash -# Just build all projects with msbuild -echo "Preparing to build MelonVPN" -msbuild MelonVPN.sln -m /t:MelonVPNCore /t:MelonVPNConnectedClientUpdate /t:MelonVPNDaemon /t:MelonVPNClient /p:Configuration=Release /p:Platform=x86 diff --git a/install b/install new file mode 100755 index 0000000..d71d610 --- /dev/null +++ b/install @@ -0,0 +1,8 @@ +#!/bin/bash +echo "[info] Preparing to setup dependencies" +./install-dependencies $1 +echo "[info] Preparing to build projects from source" +./build +echo "[info] Preparing to install components" +./install-components +echo "[info] Install process finished" diff --git a/install-dependencies b/install-dependencies index f3b1583..3fbe157 100755 --- a/install-dependencies +++ b/install-dependencies @@ -2,11 +2,26 @@ # Check if golang exists by the output of "go version" if [ "$(go version | head -c 13)" == "go version go" ]; then echo "Assuming go is installed" - + shouldbuild="neigh" # Check location for simple vpn binary if [ -f /usr/bin/simple-vpn ]; then echo "Found \"/usr/bin/simple-vpn\" assuming it is installed correctly" + echo "Run this script with force as a first argument to force a re-install" else + shouldbuild="ye" + fi + # Look for an argument to force simple vpn re-install + if [ "$1" = "force" ]; then + shouldbuild="ye" + echo "Install enforced!" + fi + if [ "$shouldbuild" = "ye" ]; then + # Check for git repo existence if forcing re-install and delete if it does + if [ -d simple-vpn ]; then + echo "Found previous simple-vpn git download in working directory:" + echo "Deleting!" + rm -f -R simple-vpn + fi # Clone github repo echo "Cloning simple-vpn" git clone https://codehub.onpointcoding.net/sean/simple-vpn.git