Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
| ... | ... |
@@ -29,7 +29,8 @@ arches=( amd64 i386 ) |
| 29 | 29 |
|
| 30 | 30 |
# Preserve existing components but don't add any non-existing ones |
| 31 | 31 |
for component in main testing experimental ; do |
| 32 |
- if ls "$APTDIR/dists/*/$component" >/dev/null 2>&1 ; then |
|
| 32 |
+ exists=$(find "$APTDIR/dists" -mindepth 2 -maxdepth 2 -type d -name "$component" -print -quit) |
|
| 33 |
+ if [ -n "$exists" ] ; then |
|
| 33 | 34 |
components+=( $component ) |
| 34 | 35 |
fi |
| 35 | 36 |
done |
| ... | ... |
@@ -89,14 +90,12 @@ for dir in contrib/builder/deb/${PACKAGE_ARCH}/*/; do
|
| 89 | 89 |
EOF |
| 90 | 90 |
done >> "$APTDIR/conf/apt-ftparchive.conf" |
| 91 | 91 |
|
| 92 |
-if [ ! -f "$APTDIR/conf/docker-engine-release.conf" ]; then |
|
| 93 |
- cat <<-EOF > "$APTDIR/conf/docker-engine-release.conf" |
|
| 94 |
- APT::FTPArchive::Release::Origin "Docker"; |
|
| 95 |
- APT::FTPArchive::Release::Components "${components[*]}";
|
|
| 96 |
- APT::FTPArchive::Release::Label "Docker APT Repository"; |
|
| 97 |
- APT::FTPArchive::Release::Architectures "${arches[*]}";
|
|
| 98 |
- EOF |
|
| 99 |
-fi |
|
| 92 |
+cat <<-EOF > "$APTDIR/conf/docker-engine-release.conf" |
|
| 93 |
+APT::FTPArchive::Release::Origin "Docker"; |
|
| 94 |
+APT::FTPArchive::Release::Components "${component}";
|
|
| 95 |
+APT::FTPArchive::Release::Label "Docker APT Repository"; |
|
| 96 |
+APT::FTPArchive::Release::Architectures "${arches[*]}";
|
|
| 97 |
+EOF |
|
| 100 | 98 |
|
| 101 | 99 |
# release the debs |
| 102 | 100 |
for dir in contrib/builder/deb/${PACKAGE_ARCH}/*/; do
|