From e54be48ec10acff6bb7cd0d1bdfa025c45218f1f Mon Sep 17 00:00:00 2001 From: Jonathan Dahan Date: Sun, 2 Jun 2024 14:46:02 -0400 Subject: [PATCH] separate --- hooks/pre-push | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/hooks/pre-push b/hooks/pre-push index 2ef7f2c..8b04fe0 100755 --- a/hooks/pre-push +++ b/hooks/pre-push @@ -5,5 +5,9 @@ remote="$1" url="$2" echo "[deploy] updating post-receive hook"; { - scp hooks/post-receive ${url/\/~/:~}/hooks/post-receive + ssh_host=(echo $url | cut -d'/' -f3) + ssh_path=(echo $url | cut -d'/' -f4-) + + echo scp hooks/post-receive ${ssh_host}:${ssh_path}/hooks/post-receive } +exit 1 \ No newline at end of file