-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.sh
executable file
·35 lines (26 loc) · 818 Bytes
/
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
REPOSRC="https://github.com/qmk/qmk_firmware"
LOCALREPO=qmk_firmware
# We do it this way so that we can abstract if from just git later on
LOCALREPO_VC_DIR=$LOCALREPO/.git
echo "Copying files to container volume"
mkdir -p ./build-volume/custom-keymap
cp keymap.c ./build-volume/custom-keymap/
cp rules.mk ./build-volume/custom-keymap/
cp config.h ./build-volume/custom-keymap/
chmod a+x ./build-volume/entry.sh
echo "Creating build-output folder"
mkdir -p ./build-volume/build-output
echo "Download QMK firmware repo"
cd ./build-volume
if [ ! -d $LOCALREPO_VC_DIR ]
then
git clone $REPOSRC $LOCALREPO
else
cd $LOCALREPO
git pull $REPOSRC
fi
cd ../..
echo "Building container"
podman build -t qmkbuild .
echo "Running container"
podman run -v ./build-volume:/build-volume:z --rm localhost/qmkbuild