mirror of
https://github.com/community-scripts/ProxmoxVE
synced 2025-01-26 18:46:18 +00:00
Compare commits
4 Commits
d1170ab30a
...
16e5e6e729
Author | SHA1 | Date | |
---|---|---|---|
|
16e5e6e729 | ||
|
c42438be11 | ||
|
84e5fafd0d | ||
|
24a7149794 |
@ -87,6 +87,7 @@ send "helper-scripts.com\r"
|
||||
|
||||
expect eof
|
||||
EOF
|
||||
$STD composer update --no-interaction
|
||||
echo "${RELEASE}" >"/opt/${APPLICATION}_version.txt"
|
||||
msg_ok "Installed Kimai"
|
||||
|
||||
|
@ -263,3 +263,23 @@ EOF
|
||||
chmod 600 /root/.ssh/authorized_keys
|
||||
fi
|
||||
}
|
||||
|
||||
# This function downloads the latest release of a GitHub repository
|
||||
github_download_latest_release() {
|
||||
local user="$1"
|
||||
local repo="$2"
|
||||
local output_file="$3"
|
||||
local tarball_url=$($STD wget -qLO - "https://api.github.com/repos/$user/$repo/releases/latest" | grep '"tarball_url":' | cut -d '"' -f 4)
|
||||
$STD wget -qLO "$output_file" "$tarball_url"
|
||||
}
|
||||
|
||||
# This function extracts a GitHub release tarball into a target directory
|
||||
github_extract_latest_release() {
|
||||
local user="$1"
|
||||
local repo="$2"
|
||||
local output_directory="$3"
|
||||
mkdir -p "$output_directory"
|
||||
github_download_latest_release "$user" "$repo" "/tmp/$repo.tar.gz"
|
||||
tar -xzf "/tmp/$repo.tar.gz" -C "$output_directory" --strip-components 1
|
||||
rm "/tmp/$repo.tar.gz"
|
||||
}
|
Loading…
Reference in New Issue
Block a user