remote host auto set if not given
This commit is contained in:
@@ -19,9 +19,14 @@ if [ -z "${REPOSITORY}" ]; then
|
||||
echo "[!] Must set a repository path";
|
||||
error=1;
|
||||
fi;
|
||||
# if remote host is empty try to set from repository
|
||||
if [ -z "${REMOTE_HOST}" ]; then
|
||||
echo "[!] Must set a remote host for the repository";
|
||||
error=1;
|
||||
if [[ "${REPOSITORY}" == *":"* ]]; then
|
||||
REMOTE_HOST=$(echo "${REPOSITORY}" | cut -d ":" -f 1);
|
||||
else
|
||||
echo "[!] Must set a remote host for the repository";
|
||||
error=1;
|
||||
fi;
|
||||
fi;
|
||||
# if we have an ":" in the repository, split by it and replace it with the remote host
|
||||
if [[ "${REPOSITORY}" == *":"* ]]; then
|
||||
|
||||
Reference in New Issue
Block a user