[gbm-web] Make sure build-repo exists before changing directory



commit 0231a0d322f1d51229a5d57a0bc809c131b7e427
Author: Bartłomiej Piotrowski <bpiotrowski gnome org>
Date:   Thu Sep 23 20:07:30 2021 +0200

    Make sure build-repo exists before changing directory

 flat-manager/prune | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/flat-manager/prune b/flat-manager/prune
index bf92dc2..4ed5a5a 100755
--- a/flat-manager/prune
+++ b/flat-manager/prune
@@ -1,7 +1,9 @@
 #!/bin/bash
 
-cd /srv/gnome-build-meta/public_html/build-repo
-find -maxdepth 1 -type d -mtime +7 -exec rm -rf {} \;
+if [[ -d /srv/gnome-build-meta/public_html/build-repo ]]; then
+    cd /srv/gnome-build-meta/public_html/build-repo
+    find . -maxdepth 1 -type d -mtime +7 -exec rm -rf {} \;
+fi
 
 flatpak build-update-repo -v --no-update-summary --no-update-appstream --prune --prune-depth=4 
/srv/gnome-build-meta/public_html/repo
 ostree prune --repo=/srv/gnome-build-meta/public_html/gnomeos/repo/ --depth=4 --refs-only


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]