mirror of
https://github.com/tteck/Proxmox.git
synced 2025-02-15 06:09:15 +01:00
Removing release version with the v
This commit is contained in:
parent
2afc2b6991
commit
72d0a5a569
2 changed files with 6 additions and 5 deletions
|
@ -54,12 +54,12 @@ function default_settings() {
|
||||||
}
|
}
|
||||||
|
|
||||||
function update_script() {
|
function update_script() {
|
||||||
header_info
|
|
||||||
if [[ ! -f /etc/systemd/system/fooocus.service ]]; then msg_error "No ${APP} Installation Found!"; exit; fi
|
if [[ ! -f /etc/systemd/system/fooocus.service ]]; then msg_error "No ${APP} Installation Found!"; exit; fi
|
||||||
msg_info "Updating $APP LXC"
|
msg_info "Updating $APP LXC"
|
||||||
apt-get update &>/dev/null
|
apt-get update &>/dev/null
|
||||||
|
|
||||||
RELEASE=$(curl -s https://api.github.com/repos/lllyasviel/Fooocus/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }')
|
RELEASE=$(curl -s https://api.github.com/repos/lllyasviel/Fooocus/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }')
|
||||||
|
RELEASE_VERSION_NO_V=$(echo "${RELEASE}" | cut -c 2-)
|
||||||
|
|
||||||
if [[ -z "$RELEASE" ]]; then
|
if [[ -z "$RELEASE" ]]; then
|
||||||
msg_error "Failed to get latest version"
|
msg_error "Failed to get latest version"
|
||||||
|
@ -77,8 +77,8 @@ if [ "$UPD" == "1" ]; then
|
||||||
cd ~ || msg_error "Failed to change directory"
|
cd ~ || msg_error "Failed to change directory"
|
||||||
wget -q https://github.com/lllyasviel/Fooocus/archive/refs/tags/"${RELEASE}".tar.gz
|
wget -q https://github.com/lllyasviel/Fooocus/archive/refs/tags/"${RELEASE}".tar.gz
|
||||||
tar -xf "${RELEASE}".tar.gz
|
tar -xf "${RELEASE}".tar.gz
|
||||||
cp -r "Fooocus-${RELEASE}"/* /opt/Fooocus
|
cp -r "Fooocus-${RELEASE_VERSION_NO_V}"/* /opt/Fooocus
|
||||||
rm -rf "Fooocus-${RELEASE}" "${RELEASE}".tar.gz
|
rm -rf "Fooocus-${RELEASE_VERSION_NO_V}" "${RELEASE}".tar.gz
|
||||||
cd /opt/Fooocus || msg_error "Failed to change directory"
|
cd /opt/Fooocus || msg_error "Failed to change directory"
|
||||||
pip3 install --upgrade pip
|
pip3 install --upgrade pip
|
||||||
pip3 install -r requirements_versions.txt
|
pip3 install -r requirements_versions.txt
|
||||||
|
|
|
@ -30,11 +30,12 @@ msg_ok "Updated Python3"
|
||||||
|
|
||||||
msg_info "Installing Fooocus"
|
msg_info "Installing Fooocus"
|
||||||
FOOOCUS_VERSION=$(wget -q https://github.com/lllyasviel/Fooocus/releases/latest -O - | grep "title>Release" | cut -d " " -f 4)
|
FOOOCUS_VERSION=$(wget -q https://github.com/lllyasviel/Fooocus/releases/latest -O - | grep "title>Release" | cut -d " " -f 4)
|
||||||
|
FOOOCUS_VERSION_NO_V=$(echo "${FOOOCUS_VERSION}" | cut -c 2-)
|
||||||
cd /opt || msg_error "Failed to change directory to /opt"
|
cd /opt || msg_error "Failed to change directory to /opt"
|
||||||
$STD wget https://github.com/lllyasviel/Fooocus/archive/refs/tags/"${FOOOCUS_VERSION}".tar.gz
|
$STD wget https://github.com/lllyasviel/Fooocus/archive/refs/tags/"${FOOOCUS_VERSION}".tar.gz
|
||||||
$STD tar -xf "${FOOOCUS_VERSION}".tar.gz
|
$STD tar -xf "${FOOOCUS_VERSION}".tar.gz
|
||||||
mv "Fooocus-${FOOOCUS_VERSION}" /opt/Fooocus
|
mv /opt/"Fooocus-${FOOOCUS_VERSION_NO_V}" /opt/Fooocus
|
||||||
rm -rf "Fooocus-${FOOOCUS_VERSION}" "${FOOOCUS_VERSION}".tar.gz
|
rm -rf "Fooocus-${FOOOCUS_VERSION_NO_V}" "${FOOOCUS_VERSION}".tar.gz
|
||||||
cd /opt/Fooocus || msg_error "Failed to change directory to /opt/Fooocus"
|
cd /opt/Fooocus || msg_error "Failed to change directory to /opt/Fooocus"
|
||||||
$STD pip3 install --upgrade pip
|
$STD pip3 install --upgrade pip
|
||||||
$STD pip3 install -r requirements.txt
|
$STD pip3 install -r requirements.txt
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue