diff options
Diffstat (limited to 'worker/scripts/fetch_code')
-rwxr-xr-x | worker/scripts/fetch_code | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/worker/scripts/fetch_code b/worker/scripts/fetch_code index 2691832..d711f82 100755 --- a/worker/scripts/fetch_code +++ b/worker/scripts/fetch_code @@ -1,10 +1,10 @@ #!/bin/bash -export LOG_PREFIX="[fetch_code $remote @ $checkout -> $path]" +export LOG_PREFIX="[fetch_code $remoteUrl @ $checkout -> $path]" -if [[ "$remote" == ssh://* ]]; then - host=$(echo "$remote" | sed -E 's#ssh://([^:]+):[0-9]+/.*#\1#') - port=$(echo "$remote" | sed -E 's#ssh://[^:]+:([0-9]+)/.*#\1#') +if [[ "$remoteUrl" == ssh://* ]]; then + host=$(echo "$remoteUrl" | sed -E 's#ssh://([^:]+):[0-9]+/.*#\1#') + port=$(echo "$remoteUrl" | sed -E 's#ssh://[^:]+:([0-9]+)/.*#\1#') log "populating host keyz~ $host:$port" ssh-keyscan -p "$port" "$host" > ./cur_known_hosts @@ -14,7 +14,7 @@ if [[ "$remote" == ssh://* ]]; then fi log "getting the codez~ time to fetch!" -git clone "$remote" "$path" +git clone "$remoteUrl" "$path" if [ ! $? -eq 0 ]; then log "D: oh nyo! couldn't clone the repo" exit 1 |