-
Notifications
You must be signed in to change notification settings - Fork 13
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
base: master
Are you sure you want to change the base?
… #8
Conversation
… will try to install needed dependancies using a package manager
exit 1 | ||
fi | ||
|
||
# try to install using apt-get |
There was a problem hiding this comment.
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" |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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) |
There was a problem hiding this comment.
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) |
There was a problem hiding this comment.
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" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice!
There was a problem hiding this comment.
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' |
There was a problem hiding this comment.
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.
There was a problem hiding this 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.
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