Sfoglia il codice sorgente

Clean up style for Xlib setup script

Alois Mahdal 3 anni fa
parent
commit
4afaf70cd3
1 ha cambiato i file con 8 aggiunte e 8 eliminazioni
  1. 8
    8
      dotfiles/config/Xlib/bin/setup

+ 8
- 8
dotfiles/config/Xlib/bin/setup Vedi File

@@ -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"