[gnome-build-meta/sam/script-fix] utils/update-local-repo.sh: Fix error when run outside source tree




commit a8ae74628537622a55c1390616e59e9883efb5db
Author: Sam Thursfield <sam afuera me uk>
Date:   Tue Aug 11 15:21:55 2020 +0200

    utils/update-local-repo.sh: Fix error when run outside source tree
    
    I need to run this script outside the source tree due to disk space
    constraints. When I do so, it fails with this error:
    
        $ env BST="bst --no-strict -C /home/sam/src/gnome-build-meta" REPO_ELEMENT=vm/repo.bst 
~/src/gnome-build-meta/utils/update-local-repo.sh
        /home/sam/src/gnome-build-meta/utils/update-local-repo.sh: line 34: utils/update-repo.sh: No such 
file or directory

 utils/update-local-repo.sh | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
---
diff --git a/utils/update-local-repo.sh b/utils/update-local-repo.sh
index 37b90b53..5c91d263 100755
--- a/utils/update-local-repo.sh
+++ b/utils/update-local-repo.sh
@@ -30,7 +30,8 @@ EOF
     mv ostree-gpg.tmp ostree-gpg
 fi
 
-utils/update-repo.sh \
+script_dir=$(dirname $0)
+$script_dir/update-repo.sh \
     --gpg-homedir=ostree-gpg \
     --gpg-sign="$(cat ostree-gpg/default-id)" \
     --collection-id=org.gnome.GnomeOS \


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