Permalink
Browse files

etcinstall: only install X11 config if X is available

  • Loading branch information...
majutsushi committed Mar 22, 2013
1 parent 39645e9 commit f0dc6d6566dda65608d6f2571ed3a01dcdaa8034
Showing with 26 additions and 24 deletions.
  1. +26 −24 bin/etcinstall.sh
View
@@ -137,33 +137,35 @@ xlink vim/gvimrc
xlink vim/vim
xlink vim/vimplaterc
-xlink xorg/fonts.conf.d
-#xlink xorg/Xresources
-#xlink xorg/xinitrc
-#xlink xorg/xinput.d
-#xlink xorg/xinputrc
-#xlink xorg/xsession
-xlink xorg/xsessionrc
-merge xorg/Xmodmap comment=!
-xmodmap $HOME/.Xmodmap
-
lesskey .etc/lesskey
-FONTDIR=$HOME/.local/share/fonts
-mkdir -p $FONTDIR
-for fontf in .etc/xorg/fonts/*.bdf; do
- font=$(basename ${fontf})
- font=${font%.bdf}
- info "Installing font ${font}"
- bdftopcf -o $FONTDIR/${font}.pcf ${fontf}
- gzip -f $FONTDIR/${font}.pcf
-done
-cd $FONTDIR
-mkfontdir
-cd $HOME
-xset -fp $FONTDIR 2> /dev/null
-xset +fp $FONTDIR
+if command -v X >/dev/null; then
+ xlink xorg/fonts.conf.d
+ #xlink xorg/Xresources
+ #xlink xorg/xinitrc
+ #xlink xorg/xinput.d
+ #xlink xorg/xinputrc
+ #xlink xorg/xsession
+ xlink xorg/xsessionrc
+ merge xorg/Xmodmap comment=!
+ xmodmap $HOME/.Xmodmap
+
+ FONTDIR=$HOME/.local/share/fonts
+ mkdir -p $FONTDIR
+ for fontf in .etc/xorg/fonts/*.bdf; do
+ font=$(basename ${fontf})
+ font=${font%.bdf}
+ info "Installing font ${font}"
+ bdftopcf -o $FONTDIR/${font}.pcf ${fontf}
+ gzip -f $FONTDIR/${font}.pcf
+ done
+ cd $FONTDIR
+ mkfontdir
+ cd $HOME
+ xset -fp $FONTDIR 2> /dev/null
+ xset +fp $FONTDIR
+fi
for tinfof in .etc/terminfo/*; do
tinfo=$(basename ${tinfof})

0 comments on commit f0dc6d6

Please sign in to comment.