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\! )
This commit is contained in:
Captain ALM 2021-03-19 10:03:39 +00:00
parent fd8c1e89fa
commit 6a6de9074c
5 changed files with 30 additions and 15 deletions

View File

@ -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 (:#)

10
build
View File

@ -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

View File

@ -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

8
install Executable file
View File

@ -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"

View File

@ -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