mirror of https://github.com/tteck/Proxmox.git
removed version variable and modified how release is obtained. added curl to dependencies and capitalized G
This commit is contained in:
parent
f190221638
commit
6f0235aa71
21
ct/gitea.sh
21
ct/gitea.sh
|
@ -9,18 +9,18 @@ source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build
|
||||||
function header_info {
|
function header_info {
|
||||||
clear
|
clear
|
||||||
cat <<"EOF"
|
cat <<"EOF"
|
||||||
_ __
|
______ _ __
|
||||||
______(_)/ /____ ____ _
|
/ ____/(_)/ /____ ____ _
|
||||||
/ __ / // __/ _ \/ __ /
|
/ / __// // __/ _ \/ __ /
|
||||||
/ /_/ / // /_/ __/ /_/ /
|
/ /_/ // // /_/ __/ /_/ /
|
||||||
\__, /_/ \__/\___/\__,_/
|
\____//_/ \__/\___/\__,_/
|
||||||
/____/
|
|
||||||
|
|
||||||
EOF
|
EOF
|
||||||
}
|
}
|
||||||
header_info
|
header_info
|
||||||
echo -e "Loading..."
|
echo -e "Loading..."
|
||||||
APP="gitea"
|
APP="Gitea"
|
||||||
var_disk="8"
|
var_disk="8"
|
||||||
var_cpu="1"
|
var_cpu="1"
|
||||||
var_ram="512"
|
var_ram="512"
|
||||||
|
@ -57,10 +57,9 @@ function default_settings() {
|
||||||
function update_script() {
|
function update_script() {
|
||||||
header_info
|
header_info
|
||||||
if [[ ! -f /usr/local/bin/gitea ]]; then msg_error "No ${APP} Installation Found!"; exit; fi
|
if [[ ! -f /usr/local/bin/gitea ]]; then msg_error "No ${APP} Installation Found!"; exit; fi
|
||||||
RELEASE=$(wget -q https://github.com/go-gitea/gitea/releases/latest -O - | grep "title>Release" | cut -d " " -f 4)
|
RELEASE=$(wget -q https://github.com/go-gitea/gitea/releases/latest -O - | grep "title>Release" | cut -d " " -f 4 | sed 's/^v//')
|
||||||
VERSION=${RELEASE#v}
|
msg_info "Updating $APP to ${RELEASE}"
|
||||||
msg_info "Updating gitea to ${RELEASE}"
|
wget -q https://github.com/go-gitea/gitea/releases/download/v$RELEASE/gitea-$RELEASE-linux-amd64
|
||||||
wget -q https://github.com/go-gitea/gitea/releases/download/$RELEASE/gitea-$VERSION-linux-amd64
|
|
||||||
systemctl stop gitea
|
systemctl stop gitea
|
||||||
rm -rf /usr/local/bin/gitea
|
rm -rf /usr/local/bin/gitea
|
||||||
mv gitea* /usr/local/bin/gitea
|
mv gitea* /usr/local/bin/gitea
|
||||||
|
|
|
@ -16,14 +16,14 @@ update_os
|
||||||
|
|
||||||
msg_info "Installing Dependencies"
|
msg_info "Installing Dependencies"
|
||||||
$STD apt-get install -y git
|
$STD apt-get install -y git
|
||||||
|
$STD apt-get install -y curl
|
||||||
$STD apt-get install -y sudo
|
$STD apt-get install -y sudo
|
||||||
$STD apt-get install -y mc
|
$STD apt-get install -y mc
|
||||||
msg_ok "Installed Dependencies"
|
msg_ok "Installed Dependencies"
|
||||||
|
|
||||||
msg_info "Installing Gitea"
|
msg_info "Installing Gitea"
|
||||||
RELEASE=$(wget -q https://github.com/go-gitea/gitea/releases/latest -O - | grep "title>Release" | cut -d " " -f 4)
|
RELEASE=$(wget -q https://github.com/go-gitea/gitea/releases/latest -O - | grep "title>Release" | cut -d " " -f 4 | sed 's/^v//')
|
||||||
VERSION=${RELEASE#v}
|
$STD wget -q https://github.com/go-gitea/gitea/releases/download/v$RELEASE/gitea-$RELEASE-linux-amd64
|
||||||
$STD wget -q https://github.com/go-gitea/gitea/releases/download/$RELEASE/gitea-$VERSION-linux-amd64
|
|
||||||
mv gitea* /usr/local/bin/gitea
|
mv gitea* /usr/local/bin/gitea
|
||||||
chmod +x /usr/local/bin/gitea
|
chmod +x /usr/local/bin/gitea
|
||||||
msg_info "Installed Gitea"
|
msg_info "Installed Gitea"
|
||||||
|
|
Loading…
Reference in New Issue