build_gitea : move variable declaration location

This commit is contained in:
minoplhy 2023-11-21 19:54:01 +07:00
parent 0d057f303a
commit c4d1722a1b
Signed by: minoplhy
GPG Key ID: 41D406044E2434BF
2 changed files with 11 additions and 12 deletions

View File

@ -15,17 +15,6 @@ do
esac
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
# Install Dependencies
@ -33,6 +22,11 @@ fi
sudo apt-get update && sudo apt-get install xz-utils wget git tar g++ make -y
# NodeJS
if [[ $NODEJS_VERSION == "" ]]
then
NODEJS_VERSION=v20.3.1
fi
DISTRO=linux-x64
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
# Golang
if [[ $GO_VERSION == "" ]]
then
GO_VERSION=1.20.5
fi
sudo unlink /usr/bin/go
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

View File

@ -12,7 +12,7 @@ curl -L https://github.com/minoplhy/scriptbox/raw/main/build_gitea/Linux/build.s
# Arguments
```
```bash
v) GITEA_GIT_TAG=${OPTARG};; # Gitea Git Tag
g) GO_VERSION=${OPTARG};; # GOLANG Version
n) NODEJS_VERSION=${OPTARG};; # NodeJS Version