Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#8

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

#8

wants to merge 1 commit into from

Conversation

MarshallAsch
Copy link
Member

will now have even more colors, will prompt for git config infos, and will try to install needed dependancies using a package manager

Note it will not actually change the directory because the script will run in a subshell but it will output a colured output telling you to change directories

Closes #7 and #6

… will try to install needed dependancies using a package manager
exit 1
fi

# try to install using apt-get
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

dnf

echo 'Python 3 is not installed. Please install it!'
installProg 'python3'

printf "\e[31mRe-run this script to try again\e[0m\n"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This doesn't explain why a user might have to try again. I can foresee people complaining about this and making our lives very sad.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually, I think this line isn't reachable? installProg always exits?

exit 1
fi

isEmail=$(git config -l | grep "user\.email" | wc -l)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

has_email?

fi

isEmail=$(git config -l | grep "user\.email" | wc -l)
isName=$(git config -l | grep "user\.name" | wc -l)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

has_name?

@@ -78,6 +164,23 @@ for i in ${!other_challenges[@]}; do
read -p "What is the GitHub username of your teammate doing challenge #${other_challenges[i]}? " team[i]
done


if [ "${team[0]}" == "${team[1]}" ]; then
printf "\e[31mTeam members can not have the same GitHub username\e[0m\n"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can combine this with the other conditions below by if [ ... ] || [ ... ] || [ ... ]

echo 'Cloned.'
echo ''

echo 'removing non challenge files'
Copy link
Member

@keeferrourke keeferrourke Sep 25, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wouldn't even echo this at the risk of confusing people. Maybe make it a call to debug if you want.

Copy link
Member

@keeferrourke keeferrourke left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved! Please address my comments before merge though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

setup script should delete irrelevant challenges from repos when set up
2 participants