mirror of
https://github.com/yusing/godoxy.git
synced 2026-04-23 00:38:33 +02:00
scripts fix
This commit is contained in:
7
.gitignore
vendored
7
.gitignore
vendored
@@ -1,9 +1,8 @@
|
|||||||
compose.yml
|
compose.yml
|
||||||
|
|
||||||
config/**
|
config/
|
||||||
|
certs/
|
||||||
bin/go-proxy.bak
|
bin/
|
||||||
|
|
||||||
templates/codemirror/
|
templates/codemirror/
|
||||||
|
|
||||||
logs/
|
logs/
|
||||||
|
|||||||
BIN
bin/go-proxy
BIN
bin/go-proxy
Binary file not shown.
@@ -1,6 +1,8 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
set -e
|
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}"
|
APP_ROOT="/opt/go-proxy/${VERSION}"
|
||||||
|
|
||||||
if [ -z "$VERSION" ]; then
|
if [ -z "$VERSION" ]; then
|
||||||
@@ -28,7 +30,7 @@ fi
|
|||||||
dl_source() {
|
dl_source() {
|
||||||
cd /tmp
|
cd /tmp
|
||||||
echo "Downloading go-proxy source ${VERSION}"
|
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"
|
echo "Done"
|
||||||
if [ $? -gt 0 ]; then
|
if [ $? -gt 0 ]; then
|
||||||
echo "Source download failed, check your internet connection and version number"
|
echo "Source download failed, check your internet connection and version number"
|
||||||
@@ -47,7 +49,7 @@ dl_source() {
|
|||||||
dl_binary() {
|
dl_binary() {
|
||||||
mkdir -p bin
|
mkdir -p bin
|
||||||
echo "Downloading go-proxy binary ${VERSION}"
|
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
|
if [ $? -gt 0 ]; then
|
||||||
echo "Binary download failed, check your internet connection and version number"
|
echo "Binary download failed, check your internet connection and version number"
|
||||||
exit 1
|
exit 1
|
||||||
|
|||||||
Reference in New Issue
Block a user