summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuke Shumaker <lukeshu@sbcglobal.net>2015-01-05 17:57:42 -0500
committerLuke Shumaker <lukeshu@sbcglobal.net>2015-01-05 17:57:42 -0500
commit72e62c36a8efd9594a65c1352faa8b31f729aef0 (patch)
tree3f399d06175319fe45c0f432520684bfe8831a0a
parent54338bc4e01e29603e9ca15a9622b66aa8c84422 (diff)
librefetch: fix paths being canonicalized incorrectly
-rwxr-xr-xsrc/librefetch/librefetch6
-rw-r--r--src/librefetch/librefetch-makepkg.conf.in2
2 files changed, 4 insertions, 4 deletions
diff --git a/src/librefetch/librefetch b/src/librefetch/librefetch
index 8225fc6..e3897c7 100755
--- a/src/librefetch/librefetch
+++ b/src/librefetch/librefetch
@@ -74,7 +74,7 @@ usage() {
}
main() {
- BUILDFILE="$(readlink -m PKGBUILD)"
+ BUILDFILE="$(realpath -Lm PKGBUILD)"
makepkg_opts=()
extra_opts=()
mode=download-create
@@ -143,7 +143,7 @@ main() {
# that $MIRRORS is configured.
# Canonicalize $dst
- dst="$(readlink -m -- "$dst")"
+ dst="$(realpath -Lm -- "$dst")"
# Mode: download #######################################################
@@ -236,7 +236,7 @@ parse_options() {
-g|--geninteg) mode=checksums;;
-S|--srcbuild) mode=srcbuild;;
-M|--makepkg) mode=makepkg;;
- -p) BUILDFILE="$(readlink -m -- "$optarg")";;
+ -p) BUILDFILE="$(realpath -Lm -- "$optarg")";;
-h|--help) mode=help;;
--) break;;
*)
diff --git a/src/librefetch/librefetch-makepkg.conf.in b/src/librefetch/librefetch-makepkg.conf.in
index d6bc93e..5b310f0 100644
--- a/src/librefetch/librefetch-makepkg.conf.in
+++ b/src/librefetch/librefetch-makepkg.conf.in
@@ -2,7 +2,7 @@
# This file should be 'source'd by makepkg.conf to enable librefetch
edit_dlagents() {
- local dlagent="@bindir@/librefetch -p $(printf %q "${BUILDFILE:-$BUILDSCRIPT}") -- %u %o"
+ local dlagent="@bindir@/librefetch -p $(printf %q "$(realpath -Lm "${BUILDFILE:-$BUILDSCRIPT}")") -- %u %o"
local i
for i in "${!DLAGENTS[@]}"; do