Skip to content

Commit

Permalink
Better way of checking if the symlink up to update exists (deb) (#20
Browse files Browse the repository at this point in the history
)

* Let apt check if symlink and file exists

* Fix syntax error on line 90
  • Loading branch information
AntonVanAssche authored Sep 2, 2022
1 parent d6be96c commit 91b4a22
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion debian/postrm
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash
if [[ "$(file /usr/bin/up)" =~ "symbolic link to /usr/bin/update" ]]; then
if [[ -L "/usr/bin/up" ]]; then
rm -rf /usr/bin/up
else
echo "It looks like your '/usr/bin/up' file isn't a symbolic link to '/usr/bin/update', so it hasn't been removed. If you stil want to remove it, you can do so with: sudo rm -f /usr/bin/up"
Expand Down
2 changes: 1 addition & 1 deletion update
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ function status() {
function internet_check() {
if ! command -v wget &>/dev/null; then
error "\`wget\` isn't installed! wget is required to perform connection tests. Please install wget."
if ! wget --spider "https://github.com" &>/dev/null; then
elif ! wget --spider "https://github.com" &>/dev/null; then
error "I tried to contact ${BLUE}${BOLD}https://github.com${LIRED} but it did not respond! Check your internet connection!"
fi
}
Expand Down

0 comments on commit 91b4a22

Please sign in to comment.