]> git.apps.os.sepia.ceph.com Git - ceph-build.git/commitdiff
sync-push: Create relative symlinks instead of absolute 1534/head
authorDavid Galloway <dgallowa@redhat.com>
Tue, 24 Mar 2020 19:28:10 +0000 (15:28 -0400)
committerDavid Galloway <dgallowa@redhat.com>
Tue, 24 Mar 2020 19:28:10 +0000 (15:28 -0400)
This allows people to `rsync --copy-links -aiv rsync://download.ceph.com/ceph/{debian,rpm}-octopus .` and have rsync follow the symlink.

The previous way of symlinking did not.

Signed-off-by: David Galloway <dgallowa@redhat.com>
scripts/sync-push

index 82cac939d91bb9569289e93e1b072dc47e178fd7..74d838c9bfa897d368df481e8037ef9ca2db2a25 100644 (file)
@@ -50,8 +50,9 @@ ceph_sync() {
 
   # Since paths are listed alphabetically/numerically in the first `for` loop, the last $version is what gets used for the new symlink below.
   if $newgen; then
-    ssh signer@download.ceph.com "ln -sfn /data/download.ceph.com/www/debian-$version /data/download.ceph.com/www/debian-$release; \
-                                  ln -sfn /data/download.ceph.com/www/rpm-$version /data/download.ceph.com/www/rpm-$release"
+    ssh signer@download.ceph.com "cd /data/download.ceph.com/www/; \
+                                  ln -sfn debian-$version debian-$release; \
+                                  ln -sfn rpm-$version rpm-$release"
   fi
 }