Browse code

only write distributions file if dne

Signed-off-by: Jessica Frazelle <princess@docker.com>

Jessica Frazelle authored on 2015/07/28 08:26:35
Showing 1 changed files
... ...
@@ -21,17 +21,19 @@ APTDIR=$DOCKER_RELEASE_DIR/apt/repo
21 21
 mkdir -p "$APTDIR/conf" "$APTDIR/db"
22 22
 
23 23
 # create/update distributions file
24
-for suite in $(exec contrib/reprepro/suites.sh); do
25
-	cat <<-EOF
26
-	Origin: Docker
27
-	Suite: $suite
28
-	Codename: $suite
29
-	Architectures: amd64 i386
30
-	Components: main testing experimental
31
-	Description: Docker APT Repository
24
+if [[ ! -f "$APTDIR/conf/distributions" ]]; then
25
+	for suite in $(exec contrib/reprepro/suites.sh); do
26
+		cat <<-EOF
27
+		Origin: Docker
28
+		Suite: $suite
29
+		Codename: $suite
30
+		Architectures: amd64 i386
31
+		Components: main testing experimental
32
+		Description: Docker APT Repository
32 33
 
33
-	EOF
34
-done > "$APTDIR/conf/distributions"
34
+		EOF
35
+	done > "$APTDIR/conf/distributions"
36
+fi
35 37
 
36 38
 # set the component and priority for the version being released
37 39
 component="main"