Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
PortWINE-old
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Vladislav
PortWINE-old
Commits
cf9ec3e7
Commit
cf9ec3e7
authored
Jan 29, 2024
by
Boria138
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added no cache to curl
parent
fd2291ec
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
7 deletions
+7
-7
functions_helper
data_from_portwine/scripts/functions_helper
+7
-7
No files found.
data_from_portwine/scripts/functions_helper
View file @
cf9ec3e7
...
...
@@ -118,10 +118,10 @@ try_download_game () {
[[
-f
"
${
PW_AUTOINSTALL_EXE
}
"
]]
&&
try_remove_file
"
${
PW_AUTOINSTALL_EXE
}
"
PW_DOWNLOAD_FILE_NAME
=
"
$(
basename
$1
)
"
set
-o
pipefail
wget
-O
"
$2
"
--read-timeout
300
--retry-connrefused
--timeout
3
--tries
2
--no-dns-cache
--no-cache
\
--user-agent
=
"Mozilla/5.0 (compatible; Konqueror/2.1.1; X11)"
"
$1
"
2>&1
|
\
tr
'\r'
'\n'
|
sed
-u
's/.* \([0-9]\+%\)\ \+\([0-9,.]\+.\) \(.*\)/\1\n#Downloading at \1\/, \2\/s, ETA \3/; s/^20[0-9][0-9].*/#Done./'
|
\
zenity
--progress
--percentage
=
0
--title
=
"Download
${
PW_DOWNLOAD_FILE_NAME
}
"
--text
=
Starting...
--auto-close
--width
=
500
--height
=
90
curl
-C
- -#
-A
"Mozilla/5.0 (compatible; Konqueror/2.1.1; X11)"
-H
'Cache-Control: no-cache, no-store'
-H
'Pragma: no-cache'
-L
"
$1
"
-o
"
$2
"
2>&1 |
\
tr
'\r'
'\n'
|
sed
-u
-e
's/#//g'
-e
's/ //g'
-e
's/\.[[:digit:]]%//'
|
\
"
${
pw_yad_v12_3
}
"
--progress
--percentage
=
0
--text
=
"Download
${
PW_DOWNLOAD_FILE_NAME
}
"
--auto-close
--no-escape
\
--auto-kill
--center
--text-align
=
"center"
--fixed
--no-buttons
--title
"PortProton"
--width
=
500
--height
=
90
if
[
"
${
PIPESTATUS
[0]
}
"
!=
0
]
;
then
print_error
"Failed to download
${
PW_DOWNLOAD_FILE_NAME
}
."
return
1
...
...
@@ -133,7 +133,7 @@ try_download_game () {
try_download
()
{
PW_DOWNLOAD_FILE_NAME
=
"
$(
basename
$1
)
"
set
-o
pipefail
curl -#
-A
"Mozilla/5.0 (compatible; Konqueror/2.1.1; X11)"
-L
"
$1
"
-o
"
$2
"
2>&1 |
\
curl -#
-A
"Mozilla/5.0 (compatible; Konqueror/2.1.1; X11)"
-
H
'Cache-Control: no-cache, no-store'
-H
'Pragma: no-cache'
-
L
"
$1
"
-o
"
$2
"
2>&1 |
\
tr
'\r'
'\n'
|
sed
-u
-e
's/#//g'
-e
's/ //g'
-e
's/\.[[:digit:]]%//'
|
\
"
${
pw_yad_v12_3
}
"
--progress
--percentage
=
0
--text
=
"Download
${
PW_DOWNLOAD_FILE_NAME
}
"
--auto-close
--no-escape
\
--auto-kill
--center
--text-align
=
"center"
--fixed
--no-buttons
--title
"PortProton"
--width
=
500
--height
=
90
...
...
@@ -156,7 +156,7 @@ try_download () {
try_download_to_path
()
{
PW_DOWNLOAD_FILE_NAME
=
"
$(
basename
$1
)
"
set
-o
pipefail
curl -#
-A
"Mozilla/5.0 (compatible; Konqueror/2.1.1; X11)"
-L
"
$1
"
-o
"
$2
/
$PW_DOWNLOAD_FILE_NAME
"
2>&1 |
\
curl -#
-A
"Mozilla/5.0 (compatible; Konqueror/2.1.1; X11)"
-
H
'Cache-Control: no-cache, no-store'
-H
'Pragma: no-cache'
-
L
"
$1
"
-o
"
$2
/
$PW_DOWNLOAD_FILE_NAME
"
2>&1 |
\
tr
'\r'
'\n'
|
sed
-u
-e
's/#//g'
-e
's/ //g'
-e
's/\.[[:digit:]]%//'
|
\
"
${
pw_yad_v12_3
}
"
--progress
--percentage
=
0
--text
=
"Download
${
PW_DOWNLOAD_FILE_NAME
}
"
--auto-close
--no-escape
\
--auto-kill
--center
--text-align
=
"center"
--fixed
--no-buttons
--title
"PortProton"
--width
=
500
--height
=
90
...
...
@@ -169,7 +169,7 @@ try_download_to_path () {
}
try_download_silent
()
{
curl
-sS
-A
"Mozilla/5.0 (compatible; Konqueror/2.1.1; X11)"
-L
"
$1
"
-o
"
$2
"
curl
-sS
-A
"Mozilla/5.0 (compatible; Konqueror/2.1.1; X11)"
-
H
'Cache-Control: no-cache, no-store'
-H
'Pragma: no-cache'
-
L
"
$1
"
-o
"
$2
"
if
[
"
${
PIPESTATUS
[0]
}
"
!=
0
]
;
then
print_error
"Failed to download
$1
. Skipping."
try_remove_file
"
$2
"
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment