Last active
September 9, 2021 11:59
-
-
Save oblerion/3583df856a8df2e99356ab09135bc406 to your computer and use it in GitHub Desktop.
is script easly install / setup devkitpro on ubuntu , i only make this script . it only make for v1.0.2 of devkitpro
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/bash | |
# script ver b0.2 | |
#MIT License | |
#Copyright (c) 2021 oblerion | |
#Permission is hereby granted, free of charge, to any person obtaining a copy | |
#of this software and associated documentation files (the "Software"), to deal | |
#in the Software without restriction, including without limitation the rights | |
#to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
#copies of the Software, and to permit persons to whom the Software is | |
#furnished to do so, subject to the following conditions: | |
#The above copyright notice and this permission notice shall be included in all | |
#copies or substantial portions of the Software. | |
#THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | |
#IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | |
#FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | |
#AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | |
#LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | |
#OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | |
#SOFTWARE. | |
echo ---------------------------- | |
echo fast install devkitpro BEGIN | |
echo ---------------------------- | |
# version devkitpro | |
version="v1.0.2" | |
c=3 | |
c2=10 | |
c3=1 | |
if [ -d "/opt/devkitpro" ];then | |
echo ">> devkitpro is installed" | |
else | |
while [ $c != 1 ] && [ $c != 2 ];do | |
echo ">> you use 1)amd64 or 2)arm64 arch" | |
read c | |
done | |
if [ $c -eq 1 ];then | |
wget https://github.com/devkitPro/pacman/releases/download/$version/devkitpro-pacman.amd64.deb; | |
sudo dpkg -i devkitpro-pacman.amd64.deb; | |
fi | |
if [ $c -eq 2 ];then | |
wget https://github.com/devkitPro/pacman/releases/download/$version/devkitpro-pacman.arm64.deb; | |
sudo dpkg -i devkitpro-pacman.arm64.deb | |
fi | |
fi | |
while [ $c3 != 0];do | |
while [[ $c2 -lt 0 || $c2 -gt 8 ]];do | |
echo ">> what dev do you want?" | |
echo "put 0 to exit" | |
echo "1)gba" | |
echo "2)nds/ndsi" | |
echo "3)3ds" | |
echo "4)gamecube" | |
echo "5)wii" | |
echo "6)wiiu" | |
echo "7)switch" | |
echo "8)gp32" | |
read c2 | |
done | |
if [ $c2 -gt 0 ] && [ $c2 -lt 9 ];then | |
echo ">> just press enter for install"; | |
if [ ! DEVKITPRO ] then export DEVKITPRO=/opt/devkitpro fi | |
if [ ! DEVKITARM ] then export DEVKITARM=/opt/devkitpro/devkitARM fi | |
fi | |
if [ $c2 -eq 1 ];then | |
sudo dkp-pacman -S gba-dev | |
echo for examples look at /opt/devkitpro/examples/gba | |
fi | |
if [ $c2 -eq 2 ];then | |
sudo dkp-pacman -S nds-dev | |
echo for examples look at /opt/devkitpro/examples/nds | |
fi | |
if [ $c2 -eq 3 ];then | |
sudo dkp-pacman -S 3ds-dev | |
echo for examples look at /opt/devkitpro/examples/3ds | |
fi | |
if [ $c2 -eq 4 ];then | |
sudo dkp-pacman -S gamecube-dev | |
echo for examples look at /opt/devkitpro/examples/gamecube | |
fi | |
if [ $c2 -eq 5 ];then | |
sudo dkp-pacman -S wii-dev | |
echo for examples look at /opt/devkitpro/examples/wii | |
fi | |
if [ $c2 -eq 6 ];then | |
sudo dkp-pacman -S wiiu-dev | |
echo for examples look at /opt/devkitpro/examples/wiiu | |
fi | |
if [ $c2 -eq 7 ];then | |
sudo dkp-pacman -S switch-dev | |
echo for examples look at /opt/devkitpro/examples/switch | |
fi | |
if [ $c2 -eq 8 ];then | |
sudo dkp-pacman -S gp32-dev | |
echo for examples look at /opt/devkitpro/examples/gp32 | |
fi | |
if [ -d "/opt/devkitpro" ] && [ DEVKITPRO ] && [ DEVKITARM ];then | |
echo install success | |
fi | |
echo do you want install other dev? 1 yes / 0 no | |
read c3 | |
done | |
echo --------------------------- | |
echo fast install devkitpro END | |
echo --------------------------- |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment