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

Added support for using wget to upgrade script without git #56

Closed
wants to merge 3 commits into from
Closed

Added support for using wget to upgrade script without git #56

wants to merge 3 commits into from

Conversation

cslycord
Copy link

Allows for upgrading script using wget to the raw direct location of the script at github.

Obviously, if you accept the change, it would need to have the URL uncommented to use your repo's location.

Other than that, shellcheck noticed the misspelling of the THRESHOLD_OF_WARNING variable and my editor automatically removed the unneeded tabs on empty lines and the unneeded spaces on the ends of a few lines here and there.

Change upgrade-self script to download itself using wget, then check a diff of the existing script with the downloaded, and copies over the new one if they differ.

Then it runs the new copy with "upgrade-self" for safe-keeping
Output of wget command isn't needed.
Fixed the self-upgrade script to respect CLI args passed to apt-cyg (such as --no-check-certificate)
@kou1okada
Copy link
Owner

Thank you for a nice pull request.
But, I'm glad if you separate it to three of fixing a typo, rearranging spaces and upgrade-self without git.

@kou1okada
Copy link
Owner

And below URL is not good for pull request.

local updated_url='https://raw.githubusercontent.com/cslycord/apt-cyg/master/apt-cyg'

@cslycord
Copy link
Author

cslycord commented Oct 28, 2019 via email

@cslycord
Copy link
Author

cslycord commented Oct 28, 2019 via email

@cslycord cslycord closed this Oct 28, 2019
@kou1okada
Copy link
Owner

Thank you to separate a pull request to three of below:

I'll be more happy if you drop intermediate commits each of final commits.

It can be achieved by interactive rebase with following steps:

Step 1: Start interactive rebase for last four commits.

git rebase -i HEAD~4

Step 2: Edit commit

pick d1e03eb changed upgrade-self to use wget
pick 64bdcf3 make upgrade-self wget portion quiet
pick 2d1a936 Fixed self-upgrade wget to use CLI args
pick xxxxxxx bla bla bla

to

pick d1e03eb changed upgrade-self to use wget
fixup 64bdcf3 make upgrade-self wget portion quiet
fixup 2d1a936 Fixed self-upgrade wget to use CLI args
squash xxxxxxx bla bla bla

and save it.

Step 3: Edit commit message as

  • Drop commit message ♯1:
  • Keep commit message ♯4:

and save it.

@kou1okada
Copy link
Owner

It'll changes commit hash, so you should use git push with -f option.

@cslycord
Copy link
Author

cslycord commented Oct 29, 2019 via email

@cslycord
Copy link
Author

cslycord commented Oct 29, 2019 via email

@kou1okada
Copy link
Owner

Check your current working branch with:

git log --all --graph --color --pretty=fuller --decorate=full --summary

Maybe it is not "name" but "origin/name".

And your "origin/wget" seems to be not rebased correctly.
It has typo, spacing and wget.

@cslycord
Copy link
Author

cslycord commented Oct 30, 2019 via email

@kou1okada
Copy link
Owner

Something wrong with your rebase.
image

I prepared three rebased branches to you.

Please do git reset --hard <above-branch> for your branches, and then do git push -f each for them.

@cslycord
Copy link
Author

cslycord commented Oct 30, 2019 via email

@kou1okada
Copy link
Owner

Thank you.
That seem good.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants