-
Notifications
You must be signed in to change notification settings - Fork 62
/
Copy pathgenerate-variants.sh
executable file
·49 lines (32 loc) · 1.51 KB
/
generate-variants.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
#!/bin/sh -x
tar cf variants.tar --exclude .git/ --exclude variants.tar .
mkdir -p variants/smbd-only variants/smbd-avahi variants/smbd-wsdd2
cd variants/smbd-only
tar xf ../../variants.tar
cat Dockerfile | grep -v avahi | grep -v wsdd2 > Dockerfile.new
mv Dockerfile.new Dockerfile
rm -rf config/runit/avahi
rm -rf config/runit/wsdd2
sed -i.bak '/avahi/d' ./scripts/docker-healthcheck.sh && rm ./scripts/docker-healthcheck.sh.sh.bak
sed -i.bak '/WSD/d' ./scripts/docker-healthcheck.sh && rm ./scripts/docker-healthcheck.sh.sh.bak
sed -i.bak 's/:$TAG" --push/:smbd-only-$TAG" --push/g' build.sh && rm build.sh.bak
sed -i.bak 's/:[l]atest/:smbd-only-latest/g' build.sh && rm build.sh.bak
cd ../../
cd variants/smbd-avahi
tar xf ../../variants.tar
cat Dockerfile | grep -v wsdd2 > Dockerfile.new
mv Dockerfile.new Dockerfile
rm -rf config/runit/wsdd2
sed -i.bak '/WSD/d' ./scripts/docker-healthcheck.sh && rm ./scripts/docker-healthcheck.sh.sh.bak
sed -i.bak 's/:$TAG" --push/:smbd-avahi-$TAG" --push/g' build.sh && rm build.sh.bak
sed -i.bak 's/:[l]atest/:smbd-avahi-latest/g' build.sh && rm build.sh.bak
cd ../../
cd variants/smbd-wsdd2
tar xf ../../variants.tar
cat Dockerfile | grep -v avahi > Dockerfile.new
mv Dockerfile.new Dockerfile
rm -rf config/runit/avahi
sed -i.bak '/avahi/d' ./scripts/docker-healthcheck.sh && rm ./scripts/docker-healthcheck.sh.sh.bak
sed -i.bak 's/:$TAG" --push/:smbd-wsdd2-$TAG" --push/g' build.sh && rm build.sh.bak
sed -i.bak 's/:[l]atest/:smbd-wsdd2-latest/g' build.sh && rm build.sh.bak
cd ../../