mirror of
https://github.com/yusing/godoxy.git
synced 2025-05-20 04:42:33 +02:00
scripts fix
This commit is contained in:
parent
ac26baf97f
commit
eb7e744a75
3 changed files with 8 additions and 7 deletions
7
.gitignore
vendored
7
.gitignore
vendored
|
@ -1,9 +1,8 @@
|
|||
compose.yml
|
||||
|
||||
config/**
|
||||
|
||||
bin/go-proxy.bak
|
||||
|
||||
config/
|
||||
certs/
|
||||
bin/
|
||||
templates/codemirror/
|
||||
|
||||
logs/
|
||||
|
|
BIN
bin/go-proxy
BIN
bin/go-proxy
Binary file not shown.
|
@ -1,6 +1,8 @@
|
|||
#!/bin/sh
|
||||
set -e
|
||||
BASE_URL="https://github.com/yusing/go-proxy/releases/download/${VERSION}"
|
||||
REPO_URL=https://github.com/yusing/go-proxy
|
||||
BIN_URL="${REPO_URL}/releases/download/${VERSION}/go-proxy"
|
||||
SRC_URL="${REPO_URL}/archive/refs/tags/${VERSION}.tar.gz"
|
||||
APP_ROOT="/opt/go-proxy/${VERSION}"
|
||||
|
||||
if [ -z "$VERSION" ]; then
|
||||
|
@ -28,7 +30,7 @@ fi
|
|||
dl_source() {
|
||||
cd /tmp
|
||||
echo "Downloading go-proxy source ${VERSION}"
|
||||
wget -c "${BASE_URL}.tar.gz" -O go-proxy.tar.gz 2>&1
|
||||
wget -c "${SRC_URL}" -O go-proxy.tar.gz 2>&1
|
||||
echo "Done"
|
||||
if [ $? -gt 0 ]; then
|
||||
echo "Source download failed, check your internet connection and version number"
|
||||
|
@ -47,7 +49,7 @@ dl_source() {
|
|||
dl_binary() {
|
||||
mkdir -p bin
|
||||
echo "Downloading go-proxy binary ${VERSION}"
|
||||
wget -c "${BASE_URL}/go-proxy" -O bin/go-proxy 2>&1
|
||||
wget -c "${BIN_URL}" -O bin/go-proxy 2>&1
|
||||
if [ $? -gt 0 ]; then
|
||||
echo "Binary download failed, check your internet connection and version number"
|
||||
exit 1
|
||||
|
|
Loading…
Add table
Reference in a new issue