aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authormerakor <cem@ckyln.com>2021-04-26 08:18:35 +0000
committermerakor <cem@ckyln.com>2021-04-26 08:18:35 +0000
commit97ce9d326789160e6de54140ac586fe22e1f9c83 (patch)
tree8254ad91a5a68481888f7481be743fc1e4e08947 /src
parentfb98eac3bb4060100c174247446d72dafc075112 (diff)
downloadcpt-97ce9d326789160e6de54140ac586fe22e1f9c83.tar.gz
pkg_repository_info: Use cut instead of heredoc for fossil
FossilOrigin-Name: 7f6535ab78b05c31f751fa763ff988ace8d4c6bda99fddeb2bc7638e2c07d221
Diffstat (limited to 'src')
-rw-r--r--src/cpt-lib.in7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/cpt-lib.in b/src/cpt-lib.in
index 55553e4..25ac106 100644
--- a/src/cpt-lib.in
+++ b/src/cpt-lib.in
@@ -1664,10 +1664,9 @@ pkg_repository_info() {
# Fossil repository
backend=fossil
- # We want to remove the initial spacing before the root directory.
- read -r _ rootdir <<EOF
-$rootdir
-EOF
+ # 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%/}
elif [ -f .rsync ]; then
backend=rsync