Quellcode durchsuchen

Clean up style for Xlib setup script

Alois Mahdal vor 3 Jahren
Ursprung
Commit
4afaf70cd3
1 geänderte Dateien mit 8 neuen und 8 gelöschten Zeilen
  1. 8
    8
      dotfiles/config/Xlib/bin/setup

+ 8
- 8
dotfiles/config/Xlib/bin/setup Datei anzeigen

@@ -1,11 +1,11 @@
1 1
 #!/bin/bash
2 2
 
3
-host=$(hostname -s)
3
+THIS_HOST=$(hostname -s)
4 4
 
5
-cat<<EOF > $HOME/.Xdefaults
6
-!! This file is generated by .config/Xlib/bin/setup
7
-!! from mydots.  Changes are not tracked by mydots.
8
-
9
-# include "$HOME/.config/Xlib/global.Xdefaults"
10
-# include "$HOME/.config/Xlib/host/${host}.Xdefaults"
11
-EOF
5
+{
6
+    printf '!! This file is generated by .config/Xlib/bin/setup\n'
7
+    printf '!! from mydots.  Changes are not tracked by mydots.\n'
8
+    printf '\n'
9
+    printf '# include "%s/.config/Xlib/global.Xdefaults"\n' "$HOME"
10
+    printf '# include "%s/.config/Xlib/host/%s.Xdefaults"\n' "$HOME" "$THIS_HOST"
11
+}> "$HOME/.Xdefaults"