♻️ Refactored improper if statements

This commit is contained in:
z3rOR0ne 2022-07-21 07:45:51 -07:00
parent 2f1346c29b
commit feb0fb22c6

View file

@ -148,7 +148,7 @@ if [ $numrepos -eq 0 ] ; then
tput bold & tput setaf 7
# bgit uses github api if github.com is defined as host site
if [[ -n $host && $host="github.com" ]] ; then
if [[ -n $host && $host == "github.com" ]] ; then
read -e -r -p "${txtwhite}Host site is github.com, would you like bgit to create the repository?(y/n): ${txtyellow}" crepo
# Reset output style
@ -177,7 +177,7 @@ if [ $numrepos -eq 0 ] ; then
git push --set-upstream $remote $branch
# git push -u $remote $branch
if [[ $host="github.com" ]] ; then
if [[ $host == "github.com" ]] ; then
echo "${txtgreen}Git repository created and initiated!!${txtwhite}"
# clears $GH_TOKEN from clipboard
echo '' | xclip && xclip -selection clipboard /dev/null