build_gitea : move variable declaration location
This commit is contained in:
parent
0d057f303a
commit
c4d1722a1b
@ -15,17 +15,6 @@ do
|
|||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
|
|
||||||
|
|
||||||
if [[ $NODEJS_VERSION == "" ]]
|
|
||||||
then
|
|
||||||
NODEJS_VERSION=v20.3.1
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [[ $GO_VERSION == "" ]]
|
|
||||||
then
|
|
||||||
GO_VERSION=1.20.5
|
|
||||||
fi
|
|
||||||
|
|
||||||
# GITEA_GIT_TAG is being process below
|
# GITEA_GIT_TAG is being process below
|
||||||
|
|
||||||
# Install Dependencies
|
# Install Dependencies
|
||||||
@ -33,6 +22,11 @@ fi
|
|||||||
sudo apt-get update && sudo apt-get install xz-utils wget git tar g++ make -y
|
sudo apt-get update && sudo apt-get install xz-utils wget git tar g++ make -y
|
||||||
|
|
||||||
# NodeJS
|
# NodeJS
|
||||||
|
if [[ $NODEJS_VERSION == "" ]]
|
||||||
|
then
|
||||||
|
NODEJS_VERSION=v20.3.1
|
||||||
|
fi
|
||||||
|
|
||||||
DISTRO=linux-x64
|
DISTRO=linux-x64
|
||||||
|
|
||||||
wget https://nodejs.org/dist/$NODEJS_VERSION/node-$NODEJS_VERSION-$DISTRO.tar.xz
|
wget https://nodejs.org/dist/$NODEJS_VERSION/node-$NODEJS_VERSION-$DISTRO.tar.xz
|
||||||
@ -42,6 +36,11 @@ export PATH=/usr/local/lib/nodejs/node-$NODEJS_VERSION-$DISTRO/bin:$PATH
|
|||||||
. ~/.profile
|
. ~/.profile
|
||||||
|
|
||||||
# Golang
|
# Golang
|
||||||
|
if [[ $GO_VERSION == "" ]]
|
||||||
|
then
|
||||||
|
GO_VERSION=1.20.5
|
||||||
|
fi
|
||||||
|
|
||||||
sudo unlink /usr/bin/go
|
sudo unlink /usr/bin/go
|
||||||
wget https://go.dev/dl/go$GO_VERSION.linux-amd64.tar.gz
|
wget https://go.dev/dl/go$GO_VERSION.linux-amd64.tar.gz
|
||||||
sudo rm -rf /usr/local/go && sudo tar -C /usr/local -xzf go$GO_VERSION.linux-amd64.tar.gz
|
sudo rm -rf /usr/local/go && sudo tar -C /usr/local -xzf go$GO_VERSION.linux-amd64.tar.gz
|
||||||
|
@ -12,7 +12,7 @@ curl -L https://github.com/minoplhy/scriptbox/raw/main/build_gitea/Linux/build.s
|
|||||||
|
|
||||||
# Arguments
|
# Arguments
|
||||||
|
|
||||||
```
|
```bash
|
||||||
v) GITEA_GIT_TAG=${OPTARG};; # Gitea Git Tag
|
v) GITEA_GIT_TAG=${OPTARG};; # Gitea Git Tag
|
||||||
g) GO_VERSION=${OPTARG};; # GOLANG Version
|
g) GO_VERSION=${OPTARG};; # GOLANG Version
|
||||||
n) NODEJS_VERSION=${OPTARG};; # NodeJS Version
|
n) NODEJS_VERSION=${OPTARG};; # NodeJS Version
|
||||||
|
Loading…
Reference in New Issue
Block a user