forked from rafaelromao/keyboards
-
Notifications
You must be signed in to change notification settings - Fork 0
/
init.sh
executable file
·32 lines (29 loc) · 918 Bytes
/
init.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#!/bin/bash
KEYBOARD_HOME="$(pwd)"
export QMK_HOME="$KEYBOARD_HOME/qmk_firmware"
USER_SPACE="$QMK_HOME/users"
BM40="keyboards/kprepublic/bm40hsrgb/keymaps"
XD75="keyboards/xiudi/xd75/keymaps"
if [[ ! -d "$QMK_HOME" ]]
then
echo "Add git sub-modules..."
git submodule add -f https://github.com/qmk/qmk_firmware
fi
echo "Update git sub-modules..."
git submodule sync --recursive
git submodule update --init --recursive --progress
if [[ ! -d "$USER_SPACE/rafaelromao" ]]
then
echo "Creating userspace symbolic link..."
ln -s "$KEYBOARD_HOME/qmk/users/rafaelromao" "$USER_SPACE"
fi
if [[ ! -d "$QMK_HOME/$BM40/rafaelromao" ]]
then
echo "Creating BM40 symbolic link..."
ln -s "$KEYBOARD_HOME/qmk/$BM40/rafaelromao" "$QMK_HOME/$BM40"
fi
if [[ ! -d "$QMK_HOME/$XD75/rafaelromao" ]]
then
echo "Creating XD75 symbolic link..."
ln -s "$KEYBOARD_HOME/qmk/$XD75/rafaelromao" "$QMK_HOME/$XD75"
fi