Skip to content

Commit df6109f

Browse files
committed
Cosmetic fixes to dist-installer-cli
1 parent abc35f6 commit df6109f

File tree

2 files changed

+28
-28
lines changed

2 files changed

+28
-28
lines changed

usr/bin/dist-installer-cli

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2732,45 +2732,45 @@ test_file() {
27322732
## realpath needs to be able to access the path it checks
27332733
real_file="$(sudo realpath "${file}")"
27342734
## find needs to start execution in a directory it can access
2735-
pushd /
2735+
pushd / >/dev/null
27362736
if [ "${mode}" = '-f' ]; then
27372737
if [ -z "$(${user_switch_prefix}find "${file}" -maxdepth 0 -follow -type f)" ]; then
2738-
popd
2738+
popd >/dev/null
27392739
return 1
27402740
else
2741-
popd
2741+
popd >/dev/null
27422742
return 0
27432743
fi
27442744
elif [ "${mode}" = '-d' ]; then
27452745
if [ -z "$(${user_switch_prefix}find "${file}" -maxdepth 0 -follow -type d)" ];
27462746
then
2747-
popd
2747+
popd >/dev/null
27482748
return 1
27492749
else
2750-
popd
2750+
popd >/dev/null
27512751
return 0
27522752
fi
27532753
elif [ "${mode}" = '-w' ]; then
27542754
${user_switch_prefix}test -w "${file}"
27552755
retcode="$?"
2756-
popd
2756+
popd >/dev/null
27572757
return "${retcode}"
27582758
elif [ "${mode}" = '-r' ]; then
27592759
${user_switch_prefix}test -r "${file}"
27602760
retcode="$?"
2761-
popd
2761+
popd >/dev/null
27622762
return "${retcode}"
27632763
elif [ "${mode}" = '-e' ]; then
27642764
if [ -z "$(${user_switch_prefix}find "${file}" -maxdepth 0)" ];
27652765
then
2766-
popd
2766+
popd >/dev/null
27672767
return 1
27682768
else
2769-
popd
2769+
popd >/dev/null
27702770
return 0
27712771
fi
27722772
else
2773-
popd
2773+
popd >/dev/null
27742774
return 1
27752775
fi
27762776
}
@@ -3424,7 +3424,7 @@ Developer options:
34243424
-d, --dry-run Simulate execution; log commands without executing.
34253425
--virtualbox-only Restrict actions to downloading and installing VirtualBox.
34263426
-t, --getopt Display parsed options and exit.
3427-
--user Specify the user to install the distribution VM under.
3427+
--user=username Specify the user to install the distribution VM under.
34283428
File name:
34293429
The default file name is dist-installer-cli. Basic options can be set by using
34303430
file name following the format 'guest-installer-interface'.
@@ -3592,7 +3592,7 @@ copy_thru_barrier() {
35923592
dest_file="${dest_realpath}"
35933593
fi
35943594

3595-
${user_switch_prefix}tee "${dest_file}" > /dev/null < "${source}"
3595+
${user_switch_prefix}tee "${dest_file}" >/dev/null < "${source}"
35963596
}
35973597

35983598

@@ -3835,8 +3835,8 @@ log_term_and_file() {
38353835
exec > >(${user_switch_prefix}tee -a "${log_file_user}") 2> >(${user_switch_prefix}tee -a "${log_file_debug}" >&2)
38363836
## Bash has built-in feature to redirect xtrace to the specified file.
38373837
# shellcheck disable=SC2039
3838-
true "exec 9> >(${user_switch_prefix}tee -a \"${log_file_debug}\")"
3839-
exec 9> >(${user_switch_prefix}tee -a "${log_file_debug}")
3838+
true "exec 9> >(${user_switch_prefix}tee -a \"${log_file_debug}\" >/dev/null)"
3839+
exec 9> >(${user_switch_prefix}tee -a "${log_file_debug}" >/dev/null)
38403840
export BASH_XTRACEFD=9
38413841
set -o xtrace
38423842
xtrace=1

usr/share/usability-misc/dist-installer-cli-standalone

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -3398,45 +3398,45 @@ test_file() {
33983398
## realpath needs to be able to access the path it checks
33993399
real_file="$(sudo realpath "${file}")"
34003400
## find needs to start execution in a directory it can access
3401-
pushd /
3401+
pushd / >/dev/null
34023402
if [ "${mode}" = '-f' ]; then
34033403
if [ -z "$(${user_switch_prefix}find "${file}" -maxdepth 0 -follow -type f)" ]; then
3404-
popd
3404+
popd >/dev/null
34053405
return 1
34063406
else
3407-
popd
3407+
popd >/dev/null
34083408
return 0
34093409
fi
34103410
elif [ "${mode}" = '-d' ]; then
34113411
if [ -z "$(${user_switch_prefix}find "${file}" -maxdepth 0 -follow -type d)" ];
34123412
then
3413-
popd
3413+
popd >/dev/null
34143414
return 1
34153415
else
3416-
popd
3416+
popd >/dev/null
34173417
return 0
34183418
fi
34193419
elif [ "${mode}" = '-w' ]; then
34203420
${user_switch_prefix}test -w "${file}"
34213421
retcode="$?"
3422-
popd
3422+
popd >/dev/null
34233423
return "${retcode}"
34243424
elif [ "${mode}" = '-r' ]; then
34253425
${user_switch_prefix}test -r "${file}"
34263426
retcode="$?"
3427-
popd
3427+
popd >/dev/null
34283428
return "${retcode}"
34293429
elif [ "${mode}" = '-e' ]; then
34303430
if [ -z "$(${user_switch_prefix}find "${file}" -maxdepth 0)" ];
34313431
then
3432-
popd
3432+
popd >/dev/null
34333433
return 1
34343434
else
3435-
popd
3435+
popd >/dev/null
34363436
return 0
34373437
fi
34383438
else
3439-
popd
3439+
popd >/dev/null
34403440
return 1
34413441
fi
34423442
}
@@ -4090,7 +4090,7 @@ Developer options:
40904090
-d, --dry-run Simulate execution; log commands without executing.
40914091
--virtualbox-only Restrict actions to downloading and installing VirtualBox.
40924092
-t, --getopt Display parsed options and exit.
4093-
--user Specify the user to install the distribution VM under.
4093+
--user=username Specify the user to install the distribution VM under.
40944094
File name:
40954095
The default file name is dist-installer-cli. Basic options can be set by using
40964096
file name following the format 'guest-installer-interface'.
@@ -4258,7 +4258,7 @@ copy_thru_barrier() {
42584258
dest_file="${dest_realpath}"
42594259
fi
42604260

4261-
${user_switch_prefix}tee "${dest_file}" > /dev/null < "${source}"
4261+
${user_switch_prefix}tee "${dest_file}" >/dev/null < "${source}"
42624262
}
42634263

42644264

@@ -4501,8 +4501,8 @@ log_term_and_file() {
45014501
exec > >(${user_switch_prefix}tee -a "${log_file_user}") 2> >(${user_switch_prefix}tee -a "${log_file_debug}" >&2)
45024502
## Bash has built-in feature to redirect xtrace to the specified file.
45034503
# shellcheck disable=SC2039
4504-
true "exec 9> >(${user_switch_prefix}tee -a \"${log_file_debug}\")"
4505-
exec 9> >(${user_switch_prefix}tee -a "${log_file_debug}")
4504+
true "exec 9> >(${user_switch_prefix}tee -a \"${log_file_debug}\" >/dev/null)"
4505+
exec 9> >(${user_switch_prefix}tee -a "${log_file_debug}" >/dev/null)
45064506
export BASH_XTRACEFD=9
45074507
set -o xtrace
45084508
xtrace=1

0 commit comments

Comments
 (0)