summaryrefslogtreecommitdiff
path: root/export-noobs
diff options
context:
space:
mode:
authorHugo Hromic <hhromic@users.noreply.github.com>2019-02-18 12:54:15 +0000
committerXECDesign <XECDesign@users.noreply.github.com>2019-02-18 12:54:15 +0000
commit564f8ef1b87399c0d4b798baf83f9d2b95ac77b7 (patch)
tree5a05c7d3b76868c80f11d647e8f68a18730335e4 /export-noobs
parent7068086c94a5c048aad19c412e31a3a56a5c8b78 (diff)
Silence shellcheck warnings (#255)
* Made more specific shellcheck disables * Fixed variable quoting (SC2086,SC2064) * Use `$*` expansion instead of `$@` when not using arrays (SC2124) * Use cleaner `$()` syntax instead of back quotes (SC2006) * Improved comparator (SC2166) * Minor improvements in coding style Tested clean output using: `find -name "*.sh" | xargs -n1 shellcheck -x`.
Diffstat (limited to 'export-noobs')
-rw-r--r--export-noobs/00-release/files/partition_setup.sh4
1 files changed, 3 insertions, 1 deletions
diff --git a/export-noobs/00-release/files/partition_setup.sh b/export-noobs/00-release/files/partition_setup.sh
index e41a9d3..0f45f20 100644
--- a/export-noobs/00-release/files/partition_setup.sh
+++ b/export-noobs/00-release/files/partition_setup.sh
@@ -3,6 +3,7 @@
set -ex
+# shellcheck disable=SC2154
if [ -z "$part1" ] || [ -z "$part2" ]; then
printf "Error: missing environment variable part1 or part2\n" 1>&2
exit 1
@@ -17,7 +18,8 @@ sed /tmp/1/cmdline.txt -i -e "s|root=[^ ]*|root=${part2}|"
sed /tmp/2/etc/fstab -i -e "s|^[^#].* / |${part2} / |"
sed /tmp/2/etc/fstab -i -e "s|^[^#].* /boot |${part1} /boot |"
-if [ -z $restore ]; then
+# shellcheck disable=SC2154
+if [ -z "$restore" ]; then
if [ -f /mnt/ssh ]; then
cp /mnt/ssh /tmp/1/
fi