dotfiles

regexghost dotfiles and scripts
git clone https://git.regexghost.com/dotfiles.git
Log | Files | Refs | README

retroarch-setup.sh (1895B)


      1 #!/bin/sh
      2 
      3 CONFIG_LOC="$XDG_CONFIG_HOME/retroarch"
      4 
      5 mkdir retroarch-github
      6 cd retroarch-github
      7 
      8 sudo apt install build-essential
      9 sudo apt build-dep retroarch
     10 
     11 git clone https://github.com/libretro/RetroArch
     12 cd RetroArch
     13 ./configure --prefix="$HOME/.local"
     14 make clean
     15 make -j 1
     16 make install
     17 cd ..
     18 retroarch 2> /dev/null > /dev/null # Just to create config
     19 cat "${CONFIG_LOC}/retroarch.cfg" | \
     20 	sed 's|assets_directory = "~/.config/retroarch/assets"|assets_directory = "~/.local/share/libretro/assets"|g; s|joypad_autoconfig_dir = "~/.config/retroarch/autoconfig"|joypad_autoconfig_dir = "~/.local/share/libretro/autoconfig"|g; s|osk_overlay_directory = "~/.config/retroarch/overlays/keyboards"|osk_overlay_directory = "~/.local/share/libretro/overlays/keyboards"|g; s|overlay_directory = "~/.config/retroarch/overlays"|overlay_directory = "~/.local/share/libretro/overlays"|g; s|video_shader_dir = "~/.config/retroarch/shaders"|video_shader_dir = "~/.local/share/libretro/shaders"|g' > /tmp/retroarch.cfg
     21 cp /tmp/retroarch.cfg "${CONFIG_LOC}/retroarch.cfg"
     22 
     23 read -p "q to quit if errors" quit
     24 [ "$quit" = "q" ] && exit
     25 
     26 git clone https://github.com/libretro/retroarch-assets
     27 cd retroarch-assets
     28 make install PREFIX="$HOME/.local"
     29 cd ..
     30 
     31 read -p "q to quit if errors" quit
     32 [ "$quit" = "q" ] && exit
     33 
     34 git clone https://github.com/libretro/retroarch-joypad-autoconfig
     35 cd retroarch-joypad-autoconfig
     36 make install PREFIX="$HOME/.local"
     37 cd ..
     38 
     39 read -p "q to quit if errors" quit
     40 [ "$quit" = "q" ] && exit
     41 
     42 git clone https://github.com/libretro/common-shaders
     43 cd common-shaders
     44 make install PREFIX="$HOME/.local"
     45 cd ..
     46 
     47 read -p "q to quit if errors" quit
     48 [ "$quit" = "q" ] && exit
     49 
     50 git clone https://github.com/libretro/common-overlays
     51 cd common-overlays
     52 make install PREFIX="$HOME/.local"
     53 cd ..
     54 
     55 read -p "q to quit if errors" quit
     56 [ "$quit" = "q" ] && exit
     57 
     58 cd ..
     59 
     60 ./compile-cores.sh
     61 
     62 echo "All done"