#!/bin/bash set -e -u remote="$1" url="$2" echo "[deploy] updating post-receive hook"; { 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