From f70bd2f42d70709b9c08db18f08f6b165e1753d5 Mon Sep 17 00:00:00 2001 From: Tim Beatham Date: Sat, 28 Oct 2023 22:35:56 +0100 Subject: [PATCH] Added build.sh file --- build.sh | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100755 build.sh diff --git a/build.sh b/build.sh new file mode 100755 index 0000000..eca0f93 --- /dev/null +++ b/build.sh @@ -0,0 +1,21 @@ +#!/usr/bin/bash + +directory=$( cd "$(dirname "${BASH_SOURCE[0]}")" ; pwd -P ) +install_directory="/usr/bin" +wgmesh_bin="$directory/cmd/wg-mesh/wg-mesh" +wgmeshd_bin="$directory/cmd/wgmeshd/wgmeshd" + +echo "BUILDING to $install_directory" + +cd "$(dirname $wgmesh_bin)" +go build + +cd "$(dirname $wgmeshd_bin)" +go build + +cd $directory + +mv $wgmesh_bin $install_directory +mv $wgmeshd_bin $install_directory + +echo "BUILT to $install_directory"