refactor: finish moving ssh-* scripts to own installers
[webi-installers/.git] / nerdfont / install.sh
index b281c8ffc78a33f17c5143c2a640cab731e05ef8..5a43965125c0e222c6517e9a2790ef8864bddb29 100644 (file)
@@ -1,4 +1,6 @@
-install() {
+#!/bin/bash
+
+function __init_nerdfont() {
     set -e
     set -u
 
@@ -10,15 +12,15 @@ install() {
     if [ -e "$HOME/Library/Fonts" ]; then
         # OS X
         mv "$my_nerdfont" ~/Library/Fonts/
-        my_fontdir="~/Library/Fonts/"
+        my_fontdir="Library/Fonts/"
     else
         # Linux
         mkdir -p ~/.local/share/fonts
         mv "$my_nerdfont" ~/.local/share/fonts/
-        my_fontdir="~/.local/share/fonts/"
+        my_fontdir=".local/share/fonts/"
     fi
 
-    echo "Installed $my_nerdfont to $my_fontdir"
+    echo "Installed $my_nerdfont to ~/$my_fontdir"
 }
 
-install
+__init_nerdfont