forked from veikman/dactyl-keyboard
-
Notifications
You must be signed in to change notification settings - Fork 0
/
create-models.sh
executable file
·66 lines (56 loc) · 2.45 KB
/
create-models.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
56
57
58
59
60
61
62
63
64
65
66
#!/bin/sh -eu
# Prepare models for a git commit.
OPENSCAD=
if which openscad-nightly
then
OPENSCAD=openscad-nightly
elif which openscad
then
OPENSCAD=openscad
fi
[ -n "$OPENSCAD" ] || exit 65
lein run src/dactyl_keyboard/dactyl.clj
$OPENSCAD -o things/right-hand.stl things/right-hand.scad >/dev/null 2>&1 &
#$OPENSCAD -o things/left-hand.stl things/left-hand.scad >/dev/null 2>&1 &
$OPENSCAD -o things/right-wrist.stl things/right-wrist.scad >/dev/null 2>&1 &
#$OPENSCAD -o things/left-wrist.stl things/left-wrist.scad >/dev/null 2>&1 &
# Patch files need updating.
wait
exit 0
cp things/right.scad things/right-4x5.scad
cp things/left.scad things/left-4x5.scad
cp things/right-plate.scad things/right-4x5-plate.scad
$OPENSCAD -o things/right-4x5-plate.dxf things/right-4x5-plate.scad >/dev/null 2>&1 &
$OPENSCAD -o things/right-4x5.stl things/right-4x5.scad >/dev/null 2>&1 &
$OPENSCAD -o things/left-4x5.stl things/left-4x5.scad >/dev/null 2>&1 &
patch -p1 < 4x6.patch
lein run src/dactyl_keyboard/dactyl.clj
cp things/right.scad things/right-4x6.scad
cp things/left.scad things/left-4x6.scad
cp things/right-plate.scad things/right-4x6-plate.scad
$OPENSCAD -o things/right-4x6-plate.dxf things/right-4x6-plate.scad >/dev/null 2>&1 &
$OPENSCAD -o things/right-4x6.stl things/right-4x6.scad >/dev/null 2>&1 &
$OPENSCAD -o things/left-4x6.stl things/left-4x6.scad >/dev/null 2>&1 &
git checkout src/dactyl_keyboard/dactyl.clj
patch -p1 < 5x6.patch
lein run src/dactyl_keyboard/dactyl.clj
cp things/right.scad things/right-5x6.scad
cp things/left.scad things/left-5x6.scad
cp things/right-plate.scad things/right-5x6-plate.scad
$OPENSCAD -o things/right-5x6-plate.dxf things/right-5x6-plate.scad >/dev/null 2>&1 &
$OPENSCAD -o things/right-5x6.stl things/right-5x6.scad >/dev/null 2>&1 &
$OPENSCAD -o things/left-5x6.stl things/left-5x6.scad >/dev/null 2>&1 &
git checkout src/dactyl_keyboard/dactyl.clj
patch -p1 < 6x6.patch
lein run src/dactyl_keyboard/dactyl.clj
cp things/right.scad things/right-6x6.scad
cp things/left.scad things/left-6x6.scad
cp things/right-plate.scad things/right-6x6-plate.scad
$OPENSCAD -o things/right-6x6-plate.dxf things/right-6x6-plate.scad >/dev/null 2>&1 &
$OPENSCAD -o things/right-6x6.stl things/right-6x6.scad >/dev/null 2>&1 &
$OPENSCAD -o things/left-6x6.stl things/left-6x6.scad >/dev/null 2>&1 &
git checkout src/dactyl_keyboard/dactyl.clj
# git add things/*-4x5.stl
# git add things/right-4x5-plate.dxf
# git commit -m "Add CAD files"
wait