From 9859042f5400d0d14ea91983ac26e1ed3db9fee7 Mon Sep 17 00:00:00 2001 From: Azareal Date: Sun, 29 Sep 2019 17:06:00 +1000 Subject: [PATCH] More fail-safes for weird occurences. Avoid duplicating logic in the shell files. --- dev-update-linux | 3 +-- dev-update-travis | 1 + install-linux | 4 +--- update-deps-linux | 14 ++++++++++++-- 4 files changed, 15 insertions(+), 7 deletions(-) diff --git a/dev-update-linux b/dev-update-linux index 2e3df4f2..56ffeed6 100644 --- a/dev-update-linux +++ b/dev-update-linux @@ -1,6 +1,5 @@ echo "Updating the dependencies" -go get -go get -u github.com/mailru/easyjson/... +./update-deps-linux echo "Updating Gosora" git stash diff --git a/dev-update-travis b/dev-update-travis index 6dd0aade..ef757437 100644 --- a/dev-update-travis +++ b/dev-update-travis @@ -1,3 +1,4 @@ echo "Building the patcher" go generate +./update-deps-linux go build -ldflags="-s -w" -o Patcher "./patcher" \ No newline at end of file diff --git a/install-linux b/install-linux index fa561ae3..4ea4e7a5 100644 --- a/install-linux +++ b/install-linux @@ -1,7 +1,5 @@ echo "Installing the dependencies" -go get -u github.com/mailru/easyjson/... -easyjson -pkg common -go get +./update-deps-linux echo "Building the installer" go build -ldflags="-s -w" -o Installer "./cmd/install" diff --git a/update-deps-linux b/update-deps-linux index a0907649..9ead3940 100644 --- a/update-deps-linux +++ b/update-deps-linux @@ -1,9 +1,19 @@ echo "Updating the dependencies" -cp ./common/common_easyjson.tgo ./common/common_easyjson.go +{ + cp ./common/common_easyjson.tgo ./common/common_easyjson.go +} || { + echo "Failed to copy bundled generated easyjson file" +} go get { easyjson -pkg common } || { echo "Defaulting to bundled generated easyjson file" } -go get \ No newline at end of file + +{ + go get +} || { + go get -u github.com/mailru/easyjson/... + go get +} \ No newline at end of file