Kaynağa Gözat

Make install os-switchable

Kevin Heinicke 8 yıl önce
ebeveyn
işleme
ba530e00b9
3 değiştirilmiş dosya ile 16 ekleme ve 8 silme
  1. 6 1
      install
  2. 0 7
      install.conf.yaml
  3. 10 0
      install_osx.conf.yaml

+ 6 - 1
install

@@ -3,6 +3,7 @@
 set -e
 
 CONFIG="install.conf.yaml"
+CONFIG_OSX="install_osx.conf.yaml"
 DOTBOT_DIR="dotbot"
 
 DOTBOT_BIN="bin/dotbot"
@@ -11,4 +12,8 @@ BASEDIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
 cd "${BASEDIR}"
 git submodule update --init --recursive "${DOTBOT_DIR}"
 
-"${BASEDIR}/${DOTBOT_DIR}/${DOTBOT_BIN}" -d "${BASEDIR}" -c "${CONFIG}" "${@}"
+"${BASEDIR}/${DOTBOT_DIR}/${DOTBOT_BIN}" -d "${BASEDIR}" -c "${CONFIG}"
+
+if [[ "${@}" == "osx" ]]; then
+     "${BASEDIR}/${DOTBOT_DIR}/${DOTBOT_BIN}" -d "${BASEDIR}" -c "${CONFIG_OSX}"
+fi

+ 0 - 7
install.conf.yaml

@@ -3,12 +3,6 @@
 - shell:
     - [git submodule update --init --recursive, Installing submodules]
     - ["mkdir -p ~/.config/nvim/{backup,swap,undo}", Creating nvim backup dirs]
-    -
-      command: sudo defaults write com.apple.loginwindow LoginHook $PWD/osx_startup_script.sh && ./osx_startup_script.sh
-      description: setup login hook to remap keys
-      stderr: true
-      stout: true
-      stin: true
 
 - link:
     ~/.dotfiles: ''
@@ -32,7 +26,6 @@
     ~/.zprezto:
         relink: true
         path: external/prezto/
-    /usr/local/bin/syncIgnore: scripts/syncIgnore
     ~/.ssh/rc: sshrc
     ~/.atom:
         relink: true

+ 10 - 0
install_osx.conf.yaml

@@ -0,0 +1,10 @@
+- shell:
+    -
+      command: defaults read com.apple.loginwindow || sudo defaults write com.apple.loginwindow LoginHook $PWD/osx_startup_script.sh && ./osx_startup_script.sh
+      description: setup login hook to remap keys
+      stderr: true
+      stout: true
+      stin: true
+
+- link:
+    /usr/local/bin/syncIgnore: scripts/syncIgnore