forked from sphawes/index
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathlfs.sh
More file actions
executable file
·74 lines (69 loc) · 1.95 KB
/
Copy pathlfs.sh
File metadata and controls
executable file
·74 lines (69 loc) · 1.95 KB
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
#!/bin/bash
MOBO_PCB_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_PCB_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_PCB_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"
# 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_pcb : Index Motherboard PCB files\n\tringlight_pcb : Index RingLight PCB files\n\tfeeder_pcb: Index Feeder PCB files\n"
exit;
;;
esac
# Check which file list to lock
case $2 in
mobo_pcb)
FILES=$MOBO_PCB_FILES
;;
feeder_pcb)
FILES=$FEEDER_PCB_FILES
;;
ringlight_pcb)
FILES=$RINGLIGHT_PCB_FILES
;;
*)
printf "Invalid arguments\nUsage: ./lfs.sh <lock/unlock> <FILE-LIST> <LFS-OPTIONS>\n\nSupported file lists are:\n\tmobo_pcb : Index Motherboard PCB files\n\tringlight_pcb : Index RingLight PCB files\n\tfeeder_pcb: Index Feeder PCB files\n"
exit;
;;
esac
# Lock a file list
for f in $FILES
do
git lfs $1 $3 $f &
done
wait