summaryrefslogtreecommitdiff
path: root/src/libretools.conf
diff options
context:
space:
mode:
authorLuke Shumaker <lukeshu@lukeshu.com>2018-09-20 14:58:31 -0400
committerLuke Shumaker <lukeshu@lukeshu.com>2018-09-20 14:58:31 -0400
commitcc0dfc478503c1a8117c05e2dfa3d3031a45c66d (patch)
tree7186e000e66cf624c76ac5c255ecc7d4418977a2 /src/libretools.conf
parent793cd0dfabcc081251b347f2a4fb2d3e482a1b0c (diff)
libretools.conf:HOOKPRERELEASE: Respect $XDG_CONFIG_HOME's REPODEST
~/.config/libretools/libretools.conf is loaded after /etc/libretools.conf If the file in ~/.config/ changes REPODEST, then the default value of HOOKPRERELEASE will do the wrong thing. So, change the double-quotes to single quotes; deferring evaluation of the REPODEST expression to call-time. This is made possible by the previous commit, which exposes the REPODEST variable to the hook. While we're at it, since we now have access to the parsed parts of REPODEST (like REPODEST_port and REPODEST_userhost), go ahead and use those, instead of using a gross `sed` expression to parse it in a sloppy way.
Diffstat (limited to 'src/libretools.conf')
-rw-r--r--src/libretools.conf2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libretools.conf b/src/libretools.conf
index e0789bb..9d1defe 100644
--- a/src/libretools.conf
+++ b/src/libretools.conf
@@ -29,7 +29,7 @@ ABSLIBRESEND=ssh://git@git.parabola.nu:1863/~git/abslibre/abslibre.git
REPODEST=ssh://repo@repo.parabola.nu:1863/~/staging/$LIBREUSER/staging/
## These are run before and after uploading packages
-HOOKPRERELEASE="ssh -fN $(sed -r -e 's,^ssh://,,' -e 's,[/#?].*$,,' -e 's/^(.*)(:([0-9]+))$/-p \3 \1/' -e 's/[][]//g' <<<"$REPODEST")"
+HOOKPRERELEASE='ssh -fN ${REPODEST_port:+-p "$REPODEST_port"} "${REPODEST_userhost}"'
HOOKPOSTRELEASE="sudo librechroot clean-repo"
################################################################################