Skip to content

Commit

Permalink
Merge pull request #2554 from joolswills/home_folders
Browse files Browse the repository at this point in the history
Home folders
  • Loading branch information
joolswills committed Dec 5, 2018
2 parents 2098a1c + 99b394a commit 910e067
Show file tree
Hide file tree
Showing 11 changed files with 8 additions and 18 deletions.
1 change: 0 additions & 1 deletion scriptmodules/emulators/ppsspp.sh
Expand Up @@ -158,7 +158,6 @@ function install_ppsspp() {
function configure_ppsspp() { function configure_ppsspp() {
mkRomDir "psp" mkRomDir "psp"


mkUserDir "$home/.config"
moveConfigDir "$home/.config/ppsspp" "$md_conf_root/psp" moveConfigDir "$home/.config/ppsspp" "$md_conf_root/psp"
mkUserDir "$md_conf_root/psp/PSP" mkUserDir "$md_conf_root/psp/PSP"
ln -snf "$romdir/psp" "$md_conf_root/psp/PSP/GAME" ln -snf "$romdir/psp" "$md_conf_root/psp/PSP/GAME"
Expand Down
6 changes: 1 addition & 5 deletions scriptmodules/emulators/residualvm.sh
Expand Up @@ -62,11 +62,7 @@ function install_residualvm() {
function configure_residualvm() { function configure_residualvm() {
mkRomDir "residualvm" mkRomDir "residualvm"


local dir moveConfigDir "$home/.config/residualvm" "$md_conf_root/residualvm"
for dir in .config .cache; do
mkUserDir "$home/$dir"
moveConfigDir "$home/$dir/residualvm" "$md_conf_root/residualvm"
done


# Create startup script # Create startup script
cat > "$romdir/residualvm/+Start ResidualVM.sh" << _EOF_ cat > "$romdir/residualvm/+Start ResidualVM.sh" << _EOF_
Expand Down
1 change: 0 additions & 1 deletion scriptmodules/emulators/retroarch.sh
Expand Up @@ -117,7 +117,6 @@ function configure_retroarch() {
[[ "$md_mode" == "remove" ]] && return [[ "$md_mode" == "remove" ]] && return


# move / symlink the retroarch configuration # move / symlink the retroarch configuration
mkUserDir "$home/.config"
moveConfigDir "$home/.config/retroarch" "$configdir/all/retroarch" moveConfigDir "$home/.config/retroarch" "$configdir/all/retroarch"


# move / symlink our old retroarch-joypads folder # move / symlink our old retroarch-joypads folder
Expand Down
4 changes: 1 addition & 3 deletions scriptmodules/emulators/scummvm.sh
Expand Up @@ -62,9 +62,7 @@ function configure_scummvm() {
mkRomDir "scummvm" mkRomDir "scummvm"


local dir local dir
mkUserDir "$home/.local" for dir in .config .local/share; do
for dir in .config .local/share .cache; do
mkUserDir "$home/$dir"
moveConfigDir "$home/$dir/scummvm" "$md_conf_root/scummvm" moveConfigDir "$home/$dir/scummvm" "$md_conf_root/scummvm"
done done


Expand Down
1 change: 0 additions & 1 deletion scriptmodules/emulators/stella.sh
Expand Up @@ -38,7 +38,6 @@ function install_stella() {
function configure_stella() { function configure_stella() {
mkRomDir "atari2600" mkRomDir "atari2600"


mkUserDir "$home/.config"
moveConfigDir "$home/.config/stella" "$md_conf_root/atari2600/stella" moveConfigDir "$home/.config/stella" "$md_conf_root/atari2600/stella"


addEmulator 1 "$md_id" "atari2600" "$md_inst/bin/stella -maxres 320x240 -fullscreen 1 -tia.fsfill 1 %ROM%" addEmulator 1 "$md_id" "atari2600" "$md_inst/bin/stella -maxres 320x240 -fullscreen 1 -tia.fsfill 1 %ROM%"
Expand Down
6 changes: 6 additions & 0 deletions scriptmodules/helpers.sh
Expand Up @@ -383,6 +383,12 @@ function setupDirectories() {
mkUserDir "$configdir" mkUserDir "$configdir"
mkUserDir "$configdir/all" mkUserDir "$configdir/all"


# some home folders for configs that modules rely on
mkUserDir "$home/.cache"
mkUserDir "$home/.config"
mkUserDir "$home/.local"
mkUserDir "$home/.local/share"

# make sure we have inifuncs.sh in place and that it is up to date # make sure we have inifuncs.sh in place and that it is up to date
mkdir -p "$rootdir/lib" mkdir -p "$rootdir/lib"
local helper_libs=(inifuncs.sh archivefuncs.sh) local helper_libs=(inifuncs.sh archivefuncs.sh)
Expand Down
1 change: 0 additions & 1 deletion scriptmodules/ports/cdogs-sdl.sh
Expand Up @@ -44,7 +44,6 @@ function install_cdogs-sdl() {
} }


function configure_cdogs-sdl() { function configure_cdogs-sdl() {
mkUserDir "$home/.config"
moveConfigDir "$home/.config/cdogs-sdl" "$md_conf_root/cdogs-sdl" moveConfigDir "$home/.config/cdogs-sdl" "$md_conf_root/cdogs-sdl"
addPort "$md_id" "cdogs-sdl" "C-Dogs SDL" "pushd $md_inst; $md_inst/cdogs-sdl; popd" addPort "$md_id" "cdogs-sdl" "C-Dogs SDL" "pushd $md_inst; $md_inst/cdogs-sdl; popd"
} }
2 changes: 0 additions & 2 deletions scriptmodules/ports/openblok.sh
Expand Up @@ -34,8 +34,6 @@ function install_openblok() {
} }


function configure_openblok() { function configure_openblok() {
mkUserDir "$home/.local"
mkUserDir "$home/.local/share"
moveConfigDir "$home/.local/share/openblok" "$md_conf_root/openblok" moveConfigDir "$home/.local/share/openblok" "$md_conf_root/openblok"
addPort "$md_id" "openblok" "OpenBlok" "$md_inst/openblok" addPort "$md_id" "openblok" "OpenBlok" "$md_inst/openblok"
} }
2 changes: 0 additions & 2 deletions scriptmodules/ports/openttd.sh
Expand Up @@ -30,9 +30,7 @@ function remove_openttd() {


function configure_openttd() { function configure_openttd() {
local dir local dir
mkUserDir "$home/.local"
for dir in .config .local/share; do for dir in .config .local/share; do
mkUserDir "$home/$dir"
moveConfigDir "$home/$dir/openttd" "$md_conf_root/openttd" moveConfigDir "$home/$dir/openttd" "$md_conf_root/openttd"
done done


Expand Down
1 change: 0 additions & 1 deletion scriptmodules/ports/zdoom.sh
Expand Up @@ -52,7 +52,6 @@ function add_games_zdoom() {
function configure_zdoom() { function configure_zdoom() {
mkRomDir "ports/doom" mkRomDir "ports/doom"


mkUserDir "$home/.config"
moveConfigDir "$home/.config/zdoom" "$md_conf_root/doom" moveConfigDir "$home/.config/zdoom" "$md_conf_root/doom"


[[ "$md_mode" == "install" ]] && game_data_lr-prboom [[ "$md_mode" == "install" ]] && game_data_lr-prboom
Expand Down
1 change: 0 additions & 1 deletion scriptmodules/supplementary/mehstation.sh
Expand Up @@ -102,7 +102,6 @@ function install_mehstation() {


function configure_mehstation() { function configure_mehstation() {
# move / symlink the configuration # move / symlink the configuration
mkUserDir "$home/.config"
moveConfigDir "$home/.config/mehstation" "$md_conf_root/all/mehstation" moveConfigDir "$home/.config/mehstation" "$md_conf_root/all/mehstation"


local db="$md_conf_root/all/mehstation/database.db" local db="$md_conf_root/all/mehstation/database.db"
Expand Down

0 comments on commit 910e067

Please sign in to comment.