-
Notifications
You must be signed in to change notification settings - Fork 857
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
Pull Request to add CS50 LIBS in a GNU/Linux Box through a BashScript #254
Comments
#!/usr/bin/env bash
# replace the word "harsh" to its actual symbol in this script
# Installing CS50 C and Python LIBS in a Linux Box
# Arquivo cs50-c_pyt_LIBS.sh no diretório ~/bin
# Uncommnet the following lines if you want
# to run this script in "X", or not, and make the adjustments
# to fit your taste...
if ! [[ -v DISPLAY ]] hash
# test if it is not in Xwindow
then
echo "You are not on X :p"
else
echo "You are on X :)"
fi
# Uncomment the following lines - from "if" to "fi"
# if you want to write a script to run as sudo/root
# Testa se o usuário é root ou normal. O usuário root tem o UID=0
if [[ $UID -ne 0 ]];
then printf "Non root user :p\n\nPlease run as root or sudo...\n\n"
exit 1
else
echo "Root user"
fi
# CS50-Harvard libraries for GNU/Linux
# requirements for Python
cd /tmp
sudo -H pip install cs50 submit50 style50 check50
# requirements for C
git clone https://github.com/cs50/libcs50
cd libcs50
sudo make install
sudo ldconfig
# Note:
# A regular sudo pip install flake8
# will try to use your own home directory.
# The -H instructs it to use the system's home directory.
# More info at https://stackoverflow.com/a/43623102/ formatted it for you :) |
Thx, I did not write the hash symbols because I thought github would mess with it because of .md format... Here is an example of it working on Linux in Emacs... |
@OrionRandD hi, thanks for this, you dont need to quote whole of previous comment though. this makes it hard to follow the issues. cheers (:
@MrConorAE one hash is left there ;) fix that as well. lots of thanks to you, i was not able to follow the script otherwise.
or
|
hash!/usr/bin/env bash
hash replace the word "harsh" to its actual symbol in this script
hash Installing CS50 C and Python LIBS in a Linux Box
hash Arquivo cs50-c_pyt_LIBS.sh no diretório ~/bin
hash Uncommnet the following lines if you want
hash to run this script in "X", or not, and make the adjustments
hash to fit your taste...
hash if ! [[ -v DISPLAY ]] hash test if it is not in Xwindow
hash then
hash echo "You are not on X :p"
hash else
hash echo "You are on X :)"
hash fi
hash Uncomment the following lines - from "if" to "fi"
hash if you want to write a script to run as sudo/root
hash Testa se o usuário é root ou normal. O usuário root tem o UID=0
if [[ $UID -ne 0 ]];
then printf "Non root user :p\n\nPlease run as root or sudo...\n\n"
exit 1
else
echo "Root user"
fi
hash CS50-Harvard libraries for GNU/Linux
hash requirements for Python
cd /tmp
sudo -H pip install cs50 submit50 style50 check50
hash requirements for C
git clone https://github.com/cs50/libcs50
cd libcs50
sudo make install
sudo ldconfig
hash Note:
hash A regular sudo pip install flake8
hash will try to use your own home directory.
hash The -H instructs it to use the system's home directory.
hash More info at https://stackoverflow.com/a/43623102/
The text was updated successfully, but these errors were encountered: