-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.sh
executable file
·55 lines (40 loc) · 1.22 KB
/
build.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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
#!/bin/bash
# clone qmk, copy folders, compile .uf2
cvntpad_qmk="./qmk/cvntpad"
qmk_folder="./qmk_firmware"
echo "Looking for QMK..."
qmk_which=`which qmk`
if [ $? != 0 ]
then
echo "QMK is not installed or could not be found. Please make sure you installed the QMK CLI. If you're unsure, look at https://docs.qmk.fm/#/newbs_getting_started"
exit 1
else
echo "Found QMK at ${qmk_which}!"
fi
if [ -d $qmk_folder ]
then
echo "QMK Folder exists, skipping clone... (run rm -rf ${qmk_folder} to remove)"
else
echo "Cloning QMK here..."
qmk clone
if [ $? != 0 ]
then
echo "An error occured while cloning QMK. Please check for errors in the logs above ^^^^^"
fi
fi
echo "Copying ${cvntpad_qmk} to ${qmk_folder}/keyboards/..."
cp -r $cvntpad_qmk/ $qmk_folder/keyboards/
echo "Entering QMK folder..."
cd $qmk_folder
echo "Compiling firmware for ${qmk_folder}/keyboards/cvntpad..."
qmk compile -kb cvntpad -km default
if [ $? != 0 ]
then
echo "An error occured while compiling QMK. Please check for errors in the logs above ^^^^^"
else
echo "QMK Compiled successfully! Listing .uf2 files..."
firmwares=`ls | grep .uf2`
ls | grep .uf2
echo "One of these files should be the cvntboard firmware... xoxo"
cp $firmwares ../
fi