From 725e6ebb90302730fef3784069a1610083bbb6d3 Mon Sep 17 00:00:00 2001 From: merakor Date: Sat, 3 Jul 2021 09:18:19 +0000 Subject: fossil-backend: fix pull and rootdir functions FossilOrigin-Name: 1f1b7ad14d5b792263bb3e8098c60fb375707e92b4c6f164f22a29b8ff36fffb --- src/cpt-lib.in | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/cpt-lib.in b/src/cpt-lib.in index 6b95ee7..245aa21 100644 --- a/src/cpt-lib.in +++ b/src/cpt-lib.in @@ -1656,9 +1656,10 @@ pkg_vcs_pull_fossil() { # Ensure we have proper permissions to do the pull operation. if [ -w "$PWD" ] && [ "$uid" != 0 ]; then + fossil pull fossil update else - pkg_vcs_as_root "fossil update" + pkg_vcs_as_root "fossil pull && fossil update" fi } @@ -1777,8 +1778,7 @@ pkg_vcs_info() { # We want to remove the initial spacing before the root directory, and # the leading dash on the root directory. - rootdir=$(printf '%s\n' "$rootdir" | cut -d ' ' -f2-) - rootdir=${rootdir%/} + rootdir=${rootdir#local-root: *} rootdir=${rootdir%/} elif [ -f .rsync ]; then backend=rsync rootdir=$PWD -- cgit v1.2.3