forked from opulo-inc/lumenpnp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
lfs.sh
executable file
·86 lines (79 loc) · 2.33 KB
/
lfs.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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
#!/bin/bash
MOBO_ECAD_FILES="pnp/pcb/mobo/*.sch
pnp/pcb/mobo/*.pro
pnp/pcb/mobo/*.kicad_pcb
pnp/pcb/mobo/*.lib
pnp/pcb/mobo/fp-info-cache
pnp/pcb/mobo/fp-lib-table
pnp/pcb/mobo/sym-lib-table"
RINGLIGHT_ECAD_FILES="pnp/pcb/ringLight/*.sch
pnp/pcb/ringLight/*.pro
pnp/pcb/ringLight/*.kicad_pcb
pnp/pcb/ringLight/*.lib
pnp/pcb/ringLight/fp-info-cache
pnp/pcb/ringLight/fp-lib-table
pnp/pcb/ringLight/sym-lib-table"
FEEDER_ECAD_FILES="pnp/pcb/mobo/*.sch
feeder/pcb/mobo/*.pro
feeder/pcb/mobo/*.kicad_pcb
feeder/pcb/mobo/*.lib
feeder/pcb/mobo/*.fp-info-cache
feeder/pcb/mobo/*.fp-lib-table
feeder/pcb/mobo/*.sym-lib-table
feeder/pcb/feederFloor/*.sch
feeder/pcb/feederFloor/*.pro
feeder/pcb/feederFloor/*.kicad_pcb
feeder/pcb/feederFloor/*.lib
feeder/pcb/feederFloor/*.fp-info-cache
feeder/pcb/feederFloor/*.fp-lib-table
feeder/pcb/feederFloor/*.sym-lib-table
feeder/pcb/indexingWheel/*.sch
feeder/pcb/indexingWheel/*.pro
feeder/pcb/indexingWheel/*.kicad_pcb
feeder/pcb/indexingWheel/*.lib
feeder/pcb/indexingWheel/fp-info-cache
feeder/pcb/indexingWheel/fp-lib-table
feeder/pcb/indexingWheel/sym-lib-table"
FEEDER_MCAD_FILES="feeder/cad/*.FCStd"
OPENPNP_FILES="openpnp/packages.xml
openpnp/parts.xml
openpnp/machine.xml"
# Check if a valid operation was provided
case $1 in
lock)
;;
unlock)
;;
*)
printf "Invalid arguments\nUsage: ./lfs.sh <lock/unlock> <FILE-LIST> <LFS-OPTIONS>\n\nSupported file lists are:\n\tmobo_ecad : Index Motherboard ECAD files\n\tringlight_ecad : Index RingLight ECAD files\n\tfeeder_ecad: Index Feeder ECAD files\n\tfeeder_mcad: Index Feeder MCAD files\n\topenpnp: OpenPnP configuration files\n"
exit;
;;
esac
# Check which file list to lock
case $2 in
mobo_ecad)
FILES=$MOBO_ECAD_FILES
;;
feeder_ecad)
FILES=$FEEDER_ECAD_FILES
;;
feeder_mcad)
FILES=$FEEDER_MCAD_FILES
;;
ringlight_ecad)
FILES=$RINGLIGHT_ECAD_FILES
;;
openpnp)
FILES=$OPENPNP_FILES
;;
*)
printf "Invalid arguments\nUsage: ./lfs.sh <lock/unlock> <FILE-LIST> <LFS-OPTIONS>\n\nSupported file lists are:\n\tmobo_ecad : Index Motherboard ECAD files\n\tringlight_ecad : Index RingLight ECAD files\n\tfeeder_ecad: Index Feeder ECAD files\n\tfeeder_mcad: Index Feeder MCAD files\n\topenpnp: OpenPnP configuration files\n"
exit;
;;
esac
# Lock a file list
for f in $FILES
do
git lfs $1 $3 $f &
done
wait