This needs a proper test to work
This commit is contained in:
@@ -12,13 +12,12 @@ branch="main"
|
|||||||
while getopts ":r:b:" o; do
|
while getopts ":r:b:" o; do
|
||||||
case "${o}" in
|
case "${o}" in
|
||||||
r)
|
r)
|
||||||
|
if git remote show $remote &>/dev/null;then
|
||||||
remote=${OPTARG}
|
remote=${OPTARG}
|
||||||
|
else
|
||||||
# Ensure that git remote is configured
|
|
||||||
git remote show $remote > /dev/null 2>&1 || {
|
|
||||||
echo "Error: remote '$remote' not found. Add the upstream remote to your repository and try again."
|
echo "Error: remote '$remote' not found. Add the upstream remote to your repository and try again."
|
||||||
exit 1
|
exit 1
|
||||||
}
|
fi
|
||||||
;;
|
;;
|
||||||
b)
|
b)
|
||||||
branch=${OPTARG}
|
branch=${OPTARG}
|
||||||
|
|||||||
Reference in New Issue
Block a user