Skip to content

Commit 243f3e0

Browse files
author
Richard Siomporas
committed
Fixed run script
1 parent 834fa77 commit 243f3e0

File tree

1 file changed

+17
-13
lines changed

1 file changed

+17
-13
lines changed

quick_install.sh

Lines changed: 17 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -34,14 +34,15 @@ mkdir -p $artifacts_path/configs
3434
touch $artifacts_path/run-retropie.sh && chmod +x $artifacts_path/run-retropie.sh
3535

3636
# In case the container was previously created or a step failed, stop it and remove it
37-
docker container stop retropie
38-
docker container rm retropie
37+
docker container stop $container_name
38+
docker container rm $container_name
3939

4040
docker build --tag retropie-container:0.0.1 .
4141
docker run -it -d --name=retropie retropie-container:0.0.1
4242
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
4343
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
44-
docker container stop retropie
44+
docker container stop $container_name
45+
docker container rm $container_name
4546

4647
echo "" > $artifacts_path/run-retropie.sh
4748
echo "#!/bin/bash" >> $artifacts_path/run-retropie.sh
@@ -50,16 +51,19 @@ echo "bios_folder=$artifacts_path/bios" >> $artifacts_path/run-retropie.sh
5051
echo "config_folder=$artifacts_path/configs" >> $artifacts_path/run-retropie.sh
5152
echo "container_name=$container_tag" >> $artifacts_path/run-retropie.sh
5253
echo "" >> $artifacts_path/run-retropie.sh
53-
echo "docker run -it --rm --name=retropie \" >> $artifacts_path/run-retropie.sh
54-
echo " --privileged \" >> $artifacts_path/run-retropie.sh
55-
echo " -e DISPLAY=unix:0 -v /tmp/.X11-unix:/tmp/.X11-unix \" >> $artifacts_path/run-retropie.sh
56-
echo " -e PULSE_SERVER=unix:/run/user/1000/pulse/native \" >> $artifacts_path/run-retropie.sh
57-
echo " -v /run/user/1000:/run/user/1000 \" >> $artifacts_path/run-retropie.sh
58-
echo " -v /dev/input:/dev/input \" >> $artifacts_path/run-retropie.sh
59-
echo " -v \$roms_folder:/home/pi/RetroPie/roms \" >> $artifacts_path/run-retropie.sh
60-
echo " -v \$bios_folder:/home/pi/RetroPie/BIOS \" >> $artifacts_path/run-retropie.sh
61-
echo " -v \$config_folder:/opt/retropie/configs \" >> $artifacts_path/run-retropie.sh
62-
echo " \$container_name \" >> $artifacts_path/run-retropie.sh
54+
echo "docker container stop \$container_name" >> $artifacts_path/run-retropie.sh
55+
echo "docker container rm \$container_name" >> $artifacts_path/run-retropie.sh
56+
echo "" >> $artifacts_path/run-retropie.sh
57+
echo "docker run -it --rm --name=retropie \\" >> $artifacts_path/run-retropie.sh
58+
echo " --privileged \\" >> $artifacts_path/run-retropie.sh
59+
echo " -e DISPLAY=unix:0 -v /tmp/.X11-unix:/tmp/.X11-unix \\" >> $artifacts_path/run-retropie.sh
60+
echo " -e PULSE_SERVER=unix:/run/user/1000/pulse/native \\" >> $artifacts_path/run-retropie.sh
61+
echo " -v /run/user/1000:/run/user/1000 \\" >> $artifacts_path/run-retropie.sh
62+
echo " -v /dev/input:/dev/input \\" >> $artifacts_path/run-retropie.sh
63+
echo " -v \$roms_folder:/home/pi/RetroPie/roms \\" >> $artifacts_path/run-retropie.sh
64+
echo " -v \$bios_folder:/home/pi/RetroPie/BIOS \\" >> $artifacts_path/run-retropie.sh
65+
echo " -v \$config_folder:/opt/retropie/configs \\" >> $artifacts_path/run-retropie.sh
66+
echo " \$container_name \\" >> $artifacts_path/run-retropie.sh
6367
echo " run" >> $artifacts_path/run-retropie.sh
6468
echo " " >> $artifacts_path/run-retropie.sh
6569
echo " bash" >> $artifacts_path/run-retropie.sh

0 commit comments

Comments
 (0)