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";
|
echo "[!] Must set a repository path";
|
||||||
error=1;
|
error=1;
|
||||||
fi;
|
fi;
|
||||||
|
# if remote host is empty try to set from repository
|
||||||
if [ -z "${REMOTE_HOST}" ]; then
|
if [ -z "${REMOTE_HOST}" ]; then
|
||||||
echo "[!] Must set a remote host for the repository";
|
if [[ "${REPOSITORY}" == *":"* ]]; then
|
||||||
error=1;
|
REMOTE_HOST=$(echo "${REPOSITORY}" | cut -d ":" -f 1);
|
||||||
|
else
|
||||||
|
echo "[!] Must set a remote host for the repository";
|
||||||
|
error=1;
|
||||||
|
fi;
|
||||||
fi;
|
fi;
|
||||||
# if we have an ":" in the repository, split by it and replace it with the remote host
|
# if we have an ":" in the repository, split by it and replace it with the remote host
|
||||||
if [[ "${REPOSITORY}" == *":"* ]]; then
|
if [[ "${REPOSITORY}" == *":"* ]]; then
|
||||||
|
|||||||
Reference in New Issue
Block a user