Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

make wget upgrade-self use no-check-certificate #60

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion apt-cyg
Original file line number Diff line number Diff line change
Expand Up @@ -846,7 +846,12 @@ function upgrade-self-with-wget ()
{
local updated_url='https://raw.githubusercontent.com/kou1okada/apt-cyg/master/apt-cyg' # TODO: Do not use MAGIC NUMBER
local temp_file=$(mktemp)
"${WGET[@]}" "${updated_url}" -q -O "$temp_file"

# don't get certificates for wget when running upgrade-self
# on systems where it's needed, leaving it out creates an empty file
local extra_wget_option='--no-check-certificate'

"${WGET[@]}" "${extra_wget_option}" "${updated_url}" -q -O "$temp_file"
chmod +x "$temp_file"
{ diff "$temp_file" "$SCRIPT_REALPATH" >/dev/null && exit 0; } || cp "$temp_file" "$SCRIPT_REALPATH"
rm "$temp_file"
Expand Down