@@ -39,13 +39,33 @@ docker container rm $container_name
39
39
40
40
docker build --tag retropie-container:0.0.1 .
41
41
docker run -it -d --name=retropie retropie-container:0.0.1
42
- docker cp $container_name :/home/pi/retropie-cfg.tar.gz $artifacts_path /retropie-cfg.tar.gz && tar -xvf $artifacts_path /retropie-cfg.tar.gz -C $artifacts_path /configs
43
- docker cp $container_name :/home/pi/retropie-roms.tar.gz $artifacts_path /retropie-roms.tar.gz && tar -xvf $artifacts_path /retropie-roms.tar.gz -C $artifacts_path /roms
42
+ docker cp $container_name :/home/pi/retropie-cfg.tar.gz $artifacts_path /retropie-cfg.tar.gz && tar --skip-old-files - xvf $artifacts_path /retropie-cfg.tar.gz -C $artifacts_path /configs
43
+ docker cp $container_name :/home/pi/retropie-roms.tar.gz $artifacts_path /retropie-roms.tar.gz && tar --skip-old-files - xvf $artifacts_path /retropie-roms.tar.gz -C $artifacts_path /roms
44
44
docker container stop $container_name
45
45
docker container rm $container_name
46
46
47
47
echo " " > $artifacts_path /run-retropie.sh
48
48
echo " #!/bin/bash" >> $artifacts_path /run-retropie.sh
49
+ echo " " >> $artifacts_path /run-retropie.sh
50
+ echo " help()" >> $artifacts_path /run-retropie.sh
51
+ echo " {" >> $artifacts_path /run-retropie.sh
52
+ echo " echo \"\" " >> $artifacts_path /run-retropie.sh
53
+ echo " echo \" Usage: $0 -h -c *custom arguments for docker run command\" " >> $artifacts_path /run-retropie.sh
54
+ echo " echo -e \"\\ t-h Print this help\" " >> $artifacts_path /run-retropie.sh
55
+ echo " echo -e \"\\ t-c any custom arguments you wish to provide to the docker run command, such as additional volume mounts\" " >> $artifacts_path /run-retropie.sh
56
+ echo " exit 1" >> $artifacts_path /run-retropie.sh
57
+ echo " }" >> $artifacts_path /run-retropie.sh
58
+ echo " " >> $artifacts_path /run-retropie.sh
59
+ echo " while getopts \" :hc:\" opt" >> $artifacts_path /run-retropie.sh
60
+ echo " do" >> $artifacts_path /run-retropie.sh
61
+ echo " case " \$ opt" in" >> $artifacts_path /run-retropie.sh
62
+ echo " h ) help; exit 0 ;;" >> $artifacts_path /run-retropie.sh
63
+ echo " c ) custom_args=\" $OPTARG \" ;;" >> $artifacts_path /run-retropie.sh
64
+ echo " :) echo \" missing argument for option -$OPTARG \" ; exit 1 ;;" >> $artifacts_path /run-retropie.sh
65
+ echo " \?) echo \" didnt' get that\" ; exit 1 ;;" >> $artifacts_path /run-retropie.sh
66
+ echo " esac" >> $artifacts_path /run-retropie.sh
67
+ echo " done" >> $artifacts_path /run-retropie.sh
68
+ echo " " >> $artifacts_path /run-retropie.sh
49
69
echo " roms_folder=$artifacts_path /roms" >> $artifacts_path /run-retropie.sh
50
70
echo " bios_folder=$artifacts_path /bios" >> $artifacts_path /run-retropie.sh
51
71
echo " config_folder=$artifacts_path /configs" >> $artifacts_path /run-retropie.sh
@@ -64,6 +84,7 @@ echo " -v /dev/input:/dev/input \\" >> $artifacts_path/run-retropie.sh
64
84
echo " -v \$ roms_folder:/home/pi/RetroPie/roms \\ " >> $artifacts_path /run-retropie.sh
65
85
echo " -v \$ bios_folder:/home/pi/RetroPie/BIOS \\ " >> $artifacts_path /run-retropie.sh
66
86
echo " -v \$ config_folder:/opt/retropie/configs \\ " >> $artifacts_path /run-retropie.sh
87
+ echo " \$ custom_args \\ " >> $artifacts_path /run-retropie.sh
67
88
echo " \$ container_name \\ " >> $artifacts_path /run-retropie.sh
68
89
echo " run" >> $artifacts_path /run-retropie.sh
69
90
echo " " >> $artifacts_path /run-retropie.sh
0 commit comments