Skip to content

Instantly share code, notes, and snippets.

@astronautlevel2
Created May 14, 2016 15:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save astronautlevel2/c883fb8fef59a12a951471904d2ccd5b to your computer and use it in GitHub Desktop.
Save astronautlevel2/c883fb8fef59a12a951471904d2ccd5b to your computer and use it in GitHub Desktop.
#!/bin/bash
if [ "$USER" = "root" ]
then
echo "Please do not run this script as root!"
exit
fi
echo "This script requires git, build tools, curl, autogen, and cmake! Don't bother Alex if it fails and you don't have these!"
mkdir devkit
cd devkit
curl -L http://sourceforge.net/projects/devkitpro/files/Automated%20Installer/devkitARMupdate.pl/download -o devkitARMupdate.pl
chmod +x ./devkitARMupdate.pl
./devkitARMupdate.pl ~/devkitpro
read -p "What is your shell config file? (default: ~/.bashrc): " rc
rc=${rc:-~/.bashrc}
echo "export DEVKITPRO=/home/$USER/devkitpro" >> $rc
echo "export DEVKITARM=/home/$USER/devkitpro/devkitARM" >> $rc
echo "export PATH=$PATH:/home/$USER/devkitpro/devkitARM/bin" >> $rc
source $rc
export DEVKITPRO=/home/$USER/devkitpro
export DEVKITARM=/home/$USER/devkitpro/devkitARM
export PATH=$PATH:/home/$USER/devkitpro/devkitARM/bin
cd ../
rm -r devkit
git clone https://github.com/smealum/ctrulib
cd ./ctrulib/libctru
make install
cd ../..
rm -rf ctrulib
git clone --recursive https://github.com/Kingcom/armips.git
cd armips
cmake ./
make
mv armips ~/devkitpro/devkitARM/bin
cd ..
rm -rf armips
mkdir bin2c
cd bin2c
curl -L http://astronautlevel.webege.com/bin2c.c -o bin2c.c
gcc bin2c.c -o bin2c
mv bin2c ~/devkitpro/devkitARM/bin
cd ..
rm -r bin2c
git clone --recursive https://github.com/profi200/Project_CTR.git
cd Project_CTR/makerom
make
mv makerom ~/devkitpro/devkitARM/bin
cd ../..
rm -rf Project_CTR
git clone --recursive https://github.com/fincs/picasso.git
cd picasso
./autogen.sh
./configure
make
mv picasso ~/devkitpro/devkitARM/bin
cd ../
rm -rf picasso
git clone --recursive https://github.com/Steveice10/citrus.git
cd citrus
make install
cd ../
rm -rf citrus
git clone --recursive https://github.com/fincs/citro3d.git
cd citro3d
make install
cd ../
rm -rf citro3d
echo "Done! If armips failed, make sure you have cmake. If picasso failed, make sure you have autogen. If other things failed, contact Alex."
echo "You may need to restart your terminal in order for the PATH changes to be implemented properly"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment