filename
This commit is contained in:
parent
7d5c3c18f4
commit
3eba4d1c83
@ -35,11 +35,11 @@ JAVA_VERSION="21" setup_java
|
||||
read -r -p "Do you want to Stirling-PDF with Login (Default = without Login)? [Y/n] " response
|
||||
response=${response,,} # Convert to lowercase
|
||||
if [[ "$response" == "y" || "$response" == "yes" || -z "$response" ]]; then
|
||||
fetch_and_deploy_gh_release "stirling-pdf" "Stirling-Tools/Stirling-PDF" "singlefile" "latest" "/opt/Stirling-PDF" "Stirling-PDF-with-login.jar"
|
||||
USE_ORIGINAL_FILENAME=true fetch_and_deploy_gh_release "stirling-pdf" "Stirling-Tools/Stirling-PDF" "singlefile" "latest" "/opt/Stirling-PDF" "Stirling-PDF-with-login.jar"
|
||||
mv Stirling-PDF-with-login.jar /opt/Stirling-PDF/Stirling-PDF.jar
|
||||
touch ~/.Stirling-PDF-login
|
||||
else
|
||||
fetch_and_deploy_gh_release "stirling-pdf" "Stirling-Tools/Stirling-PDF" "singlefile" "latest" "/opt/Stirling-PDF" "Stirling-PDF.jar"
|
||||
USE_ORIGINAL_FILENAME=true fetch_and_deploy_gh_release "stirling-pdf" "Stirling-Tools/Stirling-PDF" "singlefile" "latest" "/opt/Stirling-PDF" "Stirling-PDF.jar"
|
||||
fi
|
||||
|
||||
msg_info "Installing LibreOffice Components"
|
||||
|
@ -925,7 +925,7 @@ function fetch_and_deploy_gh_release() {
|
||||
}
|
||||
|
||||
mkdir -p "$target"
|
||||
if [[ "$filename" == *.zip ]]; then
|
||||
if [[ "$filename" == *.zip ]]; then
|
||||
if ! command -v unzip &>/dev/null; then
|
||||
$STD apt-get install -y unzip
|
||||
fi
|
||||
@ -986,7 +986,12 @@ function fetch_and_deploy_gh_release() {
|
||||
|
||||
filename="${asset_url##*/}"
|
||||
mkdir -p "$target"
|
||||
curl $download_timeout -fsSL -o "$target/$app" "$asset_url" || {
|
||||
|
||||
local use_filename="${USE_ORIGINAL_FILENAME:-false}"
|
||||
local target_file="$app"
|
||||
[[ "$use_filename" == "true" ]] && target_file="$filename"
|
||||
|
||||
curl $download_timeout -fsSL -o "$target/$target_file" "$asset_url" || {
|
||||
msg_error "Download failed: $asset_url"
|
||||
rm -rf "$tmpdir"
|
||||
return 1
|
||||
|
Loading…
x
Reference in New Issue
Block a user