File tree Expand file tree Collapse file tree 2 files changed +37
-7
lines changed Expand file tree Collapse file tree 2 files changed +37
-7
lines changed Original file line number Diff line number Diff line change @@ -48,16 +48,22 @@ function configure_atari800() {
48
48
mkRomDir " atari800"
49
49
mkRomDir " atari5200"
50
50
51
- mkUserDir " $md_conf_root /atari800"
51
+ if [[ " $md_mode " == " install" ]]; then
52
+ mkUserDir " $md_conf_root /atari800"
52
53
53
- # move old config if exists to new location
54
- if [[ -f " $md_conf_root /atari800.cfg" ]]; then
55
- mv " $md_conf_root /atari800.cfg" " $md_conf_root /atari800/atari800.cfg"
54
+ # move old config if exists to new location
55
+ if [[ -f " $md_conf_root /atari800.cfg" ]]; then
56
+ mv " $md_conf_root /atari800.cfg" " $md_conf_root /atari800/atari800.cfg"
57
+ fi
58
+ moveConfigFile " $home /.atari800.cfg" " $md_conf_root /atari800/atari800.cfg"
59
+
60
+ # copy launch script (used for unpacking archives)
61
+ sed " s#EMULATOR#/bin/$md_id #" " $scriptdir /scriptmodules/$md_type /atari800/atari800.sh" > " $md_inst /$md_id .sh"
62
+ chmod a+x " $md_inst /$md_id .sh"
56
63
fi
57
- moveConfigFile " $home /.atari800.cfg" " $md_conf_root /atari800/atari800.cfg"
58
64
59
- addEmulator 1 " atari800" " atari800" " $md_inst /bin/ atari800 %ROM%"
60
- addEmulator 1 " atari800" " atari5200" " $md_inst /bin/ atari800 %ROM%"
65
+ addEmulator 1 " atari800" " atari800" " $md_inst /atari800.sh %ROM%"
66
+ addEmulator 1 " atari800" " atari5200" " $md_inst /atari800.sh %ROM%"
61
67
addSystem " atari800"
62
68
addSystem " atari5200"
63
69
}
Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+
3
+ emulator=" ./EMULATOR"
4
+ rom=" $1 "
5
+
6
+ pushd " ${0%/* } " > /dev/null
7
+
8
+ if [[ -z " $rom " ]]; then
9
+ " $emulator "
10
+ else
11
+ source " ../../lib/archivefuncs.sh"
12
+
13
+ archiveExtract " $rom " " .a52 .atr .bas .bin .car .dcm .xex .xfd"
14
+
15
+ # check successful extraction and if we have at least one file
16
+ if [[ $? == 0 ]]; then
17
+ rom=" ${arch_files[0]} "
18
+ fi
19
+
20
+ " $emulator " " $rom "
21
+ archiveCleanup
22
+ fi
23
+
24
+ popd
You can’t perform that action at this time.
0 commit comments