aboutsummaryrefslogtreecommitdiff
path: root/adu-download
diff options
context:
space:
mode:
Diffstat (limited to 'adu-download')
-rwxr-xr-xadu-download14
1 files changed, 7 insertions, 7 deletions
diff --git a/adu-download b/adu-download
index dcc215e..ba021f7 100755
--- a/adu-download
+++ b/adu-download
@@ -26,13 +26,13 @@ UPDATE_SYMLINK="/system-update"
UPDATE_TARGET="${SBINDIR}/adu-upgrade"
apt-get -qq update
-apt-get -qq upgrade -d
-
-#apt-get -qq autoclean
upgrades=$(apt -qq list --upgradeable 2>/dev/null | wc -l)
-
-if [ $upgrades -gt 0 ]; then
- ln -s -- "${UPDATE_TARGET}" "${UPDATE_SYMLINK}" 2>/dev/null || true
- echo "$upgrades updates available"
+if [ "$upgrades" -eq 0 ]; then
+ exit 0
fi
+
+apt-get -qq upgrade -d
+
+ln -s -- "${UPDATE_TARGET}" "${UPDATE_SYMLINK}" 2>/dev/null || true
+echo "$upgrades updates available"