-print_verbose 1 "Updating APT listings, might take a few minutes"
-if [ -z "$ae_dry_run" ]; then
- apt_logfile="$ae_tempdir/apt.log"
- $ae_sudo apt-get update 1>"$apt_logfile" 2>&1 \
- && rm -f "$apt_logfile" \
- || {
- apt_log=$(cat "$apt_logfile")
- echo "$apt_log"
- if echo "$apt_log" | grep -q "Malformed line [0-9]* in source list $ae_output_file"; then
- $ae_sudo mv "${ae_output_file}" "${ae_output_file}-failed.disabled"
- error 6 "Update failed to possible errorneous APT listing file produced by this script. Generated $ae_output_file renamed to ${ae_output_file}-failed.disabled to not interfer"
- fi
- error 5 "Update failed with exit code $? (above output logged into $apt_logfile)."
- }
-else
- eval_dry apt-get update
+if [ ! -z "$ae_update" ]; then
+ print_verbose 1 "Updating APT listings, might take a few minutes"
+ if [ -z "$ae_dry_run" ]; then
+ apt_logfile="$ae_tempdir/apt.log"
+ $ae_sudo apt-get update 1>"$apt_logfile" 2>&1 \
+ && rm -f "$apt_logfile" \
+ || {
+ apt_log=$(cat "$apt_logfile")
+ echo "$apt_log"
+ if echo "$apt_log" | grep -q "Malformed line [0-9]* in source list $ae_output_file"; then
+ $ae_sudo mv "${ae_output_file}" "${ae_output_file}-failed.disabled"
+ error 6 "Update failed to possible errorneous APT listing file produced by this script. Generated $ae_output_file renamed to ${ae_output_file}-failed.disabled to not interfer"
+ fi
+ error 5 "Update failed with exit code $? (above output logged into $apt_logfile)."
+ }
+ else
+ eval_dry apt-get update
+ fi