shellcheck and fix checkrestart false positive
[distro-setup] / distro-begin
index 0601ff4cef1adba21cb558a04c2f7e72b88f0914..633e8d1e3c326085460c9e97784f9756a5c85a0e 100755 (executable)
@@ -83,7 +83,7 @@ has_btrfs() { ! linode; }
 home_network() { ! linode; }
 encrypted() { has_p; }
 shopt -s extglob
-export GLOBIGNORE=*/.:*/..
+export GLOBIGNORE="*/.:*/.."
 umask 022
 PATH="/a/exe:$PATH"
 sed="sed --follow-symlinks"
@@ -140,7 +140,7 @@ EOF
 
   # from /usr/share/doc/dropbear-initramfs/README.initramfs.gz
   while read -r m _; do /sbin/modinfo -F filename "$m"; done </proc/modules | \
-    sed -nr "s@^/lib/modules/`uname -r`/kernel/drivers/net(/.*)?/([^/]+)\.ko\$@\2@p" \
+    sed -nr "s@^/lib/modules/$(uname -r)/kernel/drivers/net(/.*)?/([^/]+)\.ko\$@\2@p" \
     | sudo dd of=/etc/initramfs-tools/modules
   sudo apt-get -y install initramfs-tools-core
   # initram auth keys get setup with rootsshsync
@@ -214,6 +214,7 @@ conflink
 set +x
 err-allow
 source /etc/profile.d/environment.sh
+# shellcheck source=./.bashrc
 source ~/.bashrc
 err-catch
 $interactive || set -x
@@ -576,6 +577,7 @@ if has_x; then
     # https://wiki.archlinux.org/index.php/Xinitrc
     for homedir in /home/*; do
       cp /etc/X11/xinit/xinitrc $homedir/.xinitrc
+      # shellcheck disable=SC2016
       $sed -ri '/^ *twm\b/,$d' $homedir/.xinitrc
       tee -a $homedir/.xinitrc <<'EOF'
 /a/bin/desktop-20-autostart.sh