mirror of
https://github.com/Steam-Headless/docker-steam-headless.git
synced 2023-08-28 13:41:56 +03:00
Add Lutris installer
This commit is contained in:
@@ -1 +1,2 @@
|
||||
config
|
||||
devops
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
# File Created: Saturday, 8th January 2022 7:08:46 pm
|
||||
# Author: Josh.5 (jsunnex@gmail.com)
|
||||
# -----
|
||||
# Last Modified: Saturday, 15th January 2022 11:55:48 pm
|
||||
# Modified By: Josh.5 (jsunnex@gmail.com)
|
||||
# Last Modified: Sunday, 16th January 2022 2:30:07 am
|
||||
# Modified By: Console and webGui login account (jsunnex@gmail.com)
|
||||
###
|
||||
|
||||
set -e
|
||||
@@ -42,12 +42,21 @@ for user_init_script in ${USER_HOME}/init.d/*.sh ; do
|
||||
echo
|
||||
echo "[ USER:${user_init_script}: executing... ]"
|
||||
sed -i 's/\r$//' "${user_init_script}"
|
||||
source "${user_init_script}"
|
||||
|
||||
# Execute user script in sub process.
|
||||
# This way if it is messed up, we dont get caught in an init loop
|
||||
chmod +x "${user_init_script}"
|
||||
cat "${user_init_script}" | bash
|
||||
|
||||
fi
|
||||
|
||||
done
|
||||
|
||||
# Ensure all scripts are executable
|
||||
chmod a+rwx /opt/scripts/*.sh
|
||||
|
||||
# Start supervisord
|
||||
echo
|
||||
echo "**** Starting supervisord ****";
|
||||
mkdir -p /var/log/supervisor
|
||||
chmod a+rw /var/log/supervisor
|
||||
|
||||
@@ -7,3 +7,8 @@
|
||||
|
||||
alias ls='ls --color=auto'
|
||||
PS1='[\u@\h \W]\$ '
|
||||
|
||||
# Export user's home directory bin directories
|
||||
PATH=$PATH:$HOME/.local/bin:$HOME/bin
|
||||
# Export /usr/games
|
||||
PATH=$PATH:/usr/games
|
||||
|
||||
32
overlay/opt/scripts/install_lutris.sh
Executable file
32
overlay/opt/scripts/install_lutris.sh
Executable file
@@ -0,0 +1,32 @@
|
||||
#!/usr/bin/env bash
|
||||
###
|
||||
# File: install_lutris.sh
|
||||
# Project: scripts
|
||||
# File Created: Thursday, 1st January 1970 12:45:00 pm
|
||||
# Author: Console and webGui login account (jsunnex@gmail.com)
|
||||
# -----
|
||||
# Last Modified: Sunday, 16th January 2022 2:17:37 am
|
||||
# Modified By: Console and webGui login account (jsunnex@gmail.com)
|
||||
###
|
||||
|
||||
pkg=lutris
|
||||
script_path=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd );
|
||||
script_name=$( basename "${BASH_SOURCE[0]}" )
|
||||
|
||||
|
||||
install() {
|
||||
if ! dpkg --get-selections | grep -q "^$pkg[[:space:]]*install$" >/dev/null; then
|
||||
echo "deb http://download.opensuse.org/repositories/home:/strycore/Debian_10/ ./" | tee /etc/apt/sources.list.d/lutris.list
|
||||
wget -q https://download.opensuse.org/repositories/home:/strycore/Debian_10/Release.key -O- | apt-key add -
|
||||
apt-get update
|
||||
apt-get -y install \
|
||||
lutris \
|
||||
python3-dbus
|
||||
|
||||
sed -i '/Exec=lutris %U/c\Exec=/usr/games/lutris %U' /usr/share/applications/net.lutris.Lutris.desktop
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
#INSTALLER:
|
||||
source "${script_path}/installer.sh"
|
||||
28
overlay/opt/scripts/installer.sh
Normal file
28
overlay/opt/scripts/installer.sh
Normal file
@@ -0,0 +1,28 @@
|
||||
|
||||
if [[ "${script_path}" == *"opt/script"* ]]; then
|
||||
while true; do
|
||||
echo
|
||||
read -p "Would you like to configure this container to install ${pkg^} on startup? (Y/N) " ans
|
||||
|
||||
case $ans in
|
||||
[Yy]* ) break;;
|
||||
[Nn]* ) exit;;
|
||||
* ) echo "Please answer yes or no.";;
|
||||
esac
|
||||
done
|
||||
|
||||
# Install this script to the home directory init.d
|
||||
dest_file="/home/${USER}/init.d/${script_name}"
|
||||
cp -f "${script_path}/${script_name}" "${dest_file}"
|
||||
# Remove anything under '#INSTALLER:'
|
||||
sed -i '/^#INSTALLER.*$/Q' "${dest_file}"
|
||||
# Append 'install' command
|
||||
echo 'install' >> "${dest_file}"
|
||||
echo
|
||||
echo
|
||||
echo "Installed init script '${dest_file}'"
|
||||
echo "This script will install ${pkg^} when you next restart the container."
|
||||
echo
|
||||
read -s -p "Press any key to continue"
|
||||
echo
|
||||
fi
|
||||
7
overlay/usr/share/applications/net.lutris.Lutris.desktop
Normal file
7
overlay/usr/share/applications/net.lutris.Lutris.desktop
Normal file
@@ -0,0 +1,7 @@
|
||||
[Desktop Entry]
|
||||
Name=Installer - Lutris
|
||||
Categories=Game;
|
||||
Exec=/opt/scripts/install_lutris.sh %U
|
||||
Icon=installsoftware
|
||||
Terminal=true
|
||||
Type=Application
|
||||
BIN
overlay/usr/share/pixmaps/installsoftware.png
Normal file
BIN
overlay/usr/share/pixmaps/installsoftware.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 50 KiB |
Reference in New Issue
Block a user