Skip to content

Commit

Permalink
v0.2.2 - fix to asking to update when no updates are available.
Browse files Browse the repository at this point in the history
  • Loading branch information
tavinus committed Jun 26, 2017
1 parent e9656a1 commit 5776943
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions opkg-upgrade.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@


### Initialization
OPKGUPVERSION="0.2.1"
OPKGUPVERSION="0.2.2"
OPKGBIN="$(which opkg 2>/dev/null)"
SSMTPBIN="$(which ssmtp 2>/dev/null)"
BANNERSTRING="Simple OPKG Updater v$OPKGUPVERSION"
Expand Down Expand Up @@ -72,9 +72,8 @@ main() {
upgrade_check # may exit here

local uplist="$(list_upgrades)"
local hasups=$?
if should_send_ssmtp || just_print_html; then
if [ $hasups -eq 0 ] || should_always_send || just_print_html; then
if opkg_has_update || should_always_send || just_print_html; then
QUIET_MODE=$FALSE
local email_data=''
if is_html_email; then
Expand All @@ -90,13 +89,15 @@ main() {
echo -e "$email_data" | "$SSMTPBIN" "$SEND_TO"
exit $?
fi
else
echo "whyyyy"
fi
exit 0
else
echo -e "$uplist"
fi
just_print && exit 0
[ $hasups -ne 0 ] && exit 0
opkg_has_update || { echo ; exit 0 ; }

if ! no_confirm; then
if ! confirm_upgrade; then
Expand Down Expand Up @@ -129,7 +130,7 @@ list_upgrades() {
echo -e "$PACKS"
return $TRUE
fi
echo $'\nNo packages to install!\n'
echo $'No packages to install!\n\n'
return $FALSE
}

Expand Down

0 comments on commit 5776943

Please sign in to comment.