-
-
Notifications
You must be signed in to change notification settings - Fork 123
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
Add update option #343
Add update option #343
Conversation
Please understand that I'm by no means an expert for Shell, so any suggestions are welcome 😄 |
Please target |
This pull request has conflicts, please resolve those before we can evaluate the pull request. |
Signed-off-by: strangelookingnerd <49242855+strangelookingnerd@users.noreply.github.com>
Conflicts have been resolved. |
Co-authored-by: yubiuser <ckoenig@posteo.de> Signed-off-by: strangelookingnerd <49242855+strangelookingnerd@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Currently, the output looks like
pi@s740:~$ ./padd.sh -u
[i] Updates are available
[i] Downloading via wget ...
--2023-04-14 15:52:36-- https://install.padd.sh/
Resolving install.padd.sh (install.padd.sh)... 52.33.207.7, 44.230.85.241
Connecting to install.padd.sh (install.padd.sh)|52.33.207.7|:443... connected.
HTTP request sent, awaiting response... 307 Temporary Redirect
Location: https://raw.githubusercontent.com/pi-hole/PADD/master/padd.sh [following]
--2023-04-14 15:52:37-- https://raw.githubusercontent.com/pi-hole/PADD/master/padd.sh
Resolving raw.githubusercontent.com (raw.githubusercontent.com)... 185.199.110.133, 185.199.108.133, 185.199.111.133, ...
Connecting to raw.githubusercontent.com (raw.githubusercontent.com)|185.199.110.133|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 63631 (62K) [text/plain]
Saving to: '/home/pi/padd.sh'
/home/pi/padd.sh 100%[=========================================================================================================================>] 62.14K --.-KB/s in 0.02s
2023-04-14 15:52:37 (2.79 MB/s) - '/home/pi/padd.sh' saved [63631/63631]
[✓] ... done. Restart PADD for the update to take effect
- I'm not sure if we should keep all the
wget
(andcurl
) output or suppress it? - Also there is no error handling at the moment if downloading fails for any reason.
- You might want to show the current and the new version as well?
Add error handling Show current and update version
I decided to suppress the output. Looks cleaner that way. Could still be reverted if you think otherwise.
I added some error handling, let me know what you think.
That is a great idea, added it as well. |
Looks nicer now
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good from my side.
Please rebase on latest development
and squash all commits down.
Re-created PR to squash commits in #352 |
What does this PR aim to accomplish?:
Add an option to manually update PADD if there is a new version available.
How does this PR accomplish the above?:
Add new
-u | --update
option that updates the script if there is a new version available usingwget
orcurl
.Link documentation PRs if any are needed to support this PR:
README.md has been updated.
By submitting this pull request, I confirm the following:
git rebase
)