First tests with audible prompt worked, so changed the subscripts to use the same method. It should now use audible prompt when available and not give an error if it is not available.

This commit is contained in:
Storm Dragon 2023-08-19 17:09:54 -04:00
parent 88e4b13a71
commit f114eb4859
5 changed files with 25 additions and 25 deletions

View File

@ -48,7 +48,7 @@
fi fi
# Heredocument left-aligned # Heredocument left-aligned
cat << EOF | sudo tee /etc/cron.d/0chuser &> /dev/null cat << EOF | sudo "${sudoFlags[@]}" tee /etc/cron.d/0chuser &> /dev/null
SHELL=/bin/bash SHELL=/bin/bash
PATH=/sbin:/bin:/usr/sbin:/usr/bin PATH=/sbin:/bin:/usr/sbin:/usr/bin
@reboot root usermod -a -G $groups -m -d /home/$newUser -l $newUser $oldUser && sed -i -e "s#NODM_USER=.*#NODM_USER='$newUser'#" -e "s#NODM_XSESSION=.*#NODM_XSESSION='/home/$newUser/.xinitrc'#" /etc/nodm.conf; rm -f /etc/cron.d/0chuser;reboot @reboot root usermod -a -G $groups -m -d /home/$newUser -l $newUser $oldUser && sed -i -e "s#NODM_USER=.*#NODM_USER='$newUser'#" -e "s#NODM_XSESSION=.*#NODM_XSESSION='/home/$newUser/.xinitrc'#" /etc/nodm.conf; rm -f /etc/cron.d/0chuser;reboot
@ -57,5 +57,5 @@ EOF
# Heredocument end. # Heredocument end.
# Files in cron.d must be 644 to work. # Files in cron.d must be 644 to work.
sudo chmod 644 /etc/cron.d/0chuser sudo "${sudoFlags[@]}" chmod 644 /etc/cron.d/0chuser

View File

@ -1,13 +1,13 @@
install_package() { install_package() {
# If for some reason we have to change AUR helpers, this function should make it easy to update everything all at once. # If for some reason we have to change AUR helpers, this function should make it easy to update everything all at once.
# make sure system is up to date # make sure system is up to date
yay --sudoflags "-A" --sudoloop --noconfirm -Syu yay --sudoflags "${sudoFlags[@]}" --sudoloop --noconfirm -Syu
yay --sudoflags "-A" --sudoloop --needed --noconfirm -Sy "$@" yay --sudoflags "${sudoFlags[@]}" --sudoloop --needed --noconfirm -Sy "$@"
} }
restart() { restart() {
if dialog --clear --backtitle "Stormux" --yesno "Would you like to reboot now to apply changes?" 10 80 ; then if dialog --clear --backtitle "Stormux" --yesno "Would you like to reboot now to apply changes?" 10 80 ; then
sudo reboot sudo "${sudoFlags[@]}" reboot
fi fi
} }

View File

@ -11,19 +11,19 @@ install_package cabextract box86 dos2unix p7zip unzip xdotool
wineFile="$(mktemp)" wineFile="$(mktemp)"
curl --output "$wineFile" "$wineURL" curl --output "$wineFile" "$wineURL"
# Create wine directory # Create wine directory
sudo mkdir -p /opt/wine sudo "${sudoFlags[@]}" mkdir -p /opt/wine
pushd /opt/wine pushd /opt/wine
sudo tar vxf "$wineFile" sudo "${sudoFlags[@]}" tar vxf "$wineFile"
popd popd
# Create files and links in /usr/local/bin # Create files and links in /usr/local/bin
sudo mkdir -p /usr/local/bin sudo "${sudoFlags[@]}" mkdir -p /usr/local/bin
echo -e '#!/bin/bash\nsetarch linux32 -L /opt/wine/bin/wine "$@"' | sudo tee /usr/local/bin/wine > /dev/null echo -e '#!/bin/bash\nsetarch linux32 -L /opt/wine/bin/wine "$@"' | sudo "${sudoFlags[@]}" tee /usr/local/bin/wine > /dev/null
sudo chmod 755 /usr/local/bin/wine sudo "${sudoFlags[@]}" chmod 755 /usr/local/bin/wine
find /opt/wine/bin/ -maxdepth 1 -type f -perm -u+x -exec bash -c ' find /opt/wine/bin/ -maxdepth 1 -type f -perm -u+x -exec bash -c '
for i ; do for i ; do
sudo ln -s "$i" /usr/local/bin/ sudo "${sudoFlags[@]}" ln -s "$i" /usr/local/bin/
sudo chmod 755 /usr/local/bin/"${i##*/}" sudo "${sudoFlags[@]}" chmod 755 /usr/local/bin/"${i##*/}"
done' _ {} \; done' _ {} \;
# Install audiogame-manager # Install audiogame-manager
@ -32,12 +32,12 @@ if [[ -d ~/audiogame-manager ]]; then
else else
git clone https://git.stormux.org/storm/audiogame-manager ~/audiogame-manager git clone https://git.stormux.org/storm/audiogame-manager ~/audiogame-manager
fi fi
cat << EOF | sudo tee /usr/local/bin/audiogame-manager &> /dev/null cat << EOF | sudo "${sudoFlags[@]}" tee /usr/local/bin/audiogame-manager &> /dev/null
#!/usr/bin/env bash #!/usr/bin/env bash
pushd ~/audiogame-manager pushd ~/audiogame-manager
./audiogame-manager.sh $@ ./audiogame-manager.sh $@
exit 0 exit 0
EOF EOF
sudo chmod 755 /usr/local/bin/audiogame-manager sudo "${sudoFlags[@]}" chmod 755 /usr/local/bin/audiogame-manager
restart restart

View File

@ -10,11 +10,11 @@ continue="$(yesno "Do you want to switch the active console screen reader to ${s
if [[ "$continue" == "Yes" ]]; then if [[ "$continue" == "Yes" ]]; then
if [[ "$screenreader" == "speakup" ]]; then if [[ "$screenreader" == "speakup" ]]; then
install_package espeakup install_package espeakup
sudo systemctl disable --now fenrirscreenreader.service sudo "${sudoFlags[@]}" systemctl disable --now fenrirscreenreader.service
sudo systemctl enable --now espeakup.service sudo "${sudoFlags[@]}" systemctl enable --now espeakup.service
fi fi
if [[ "$screenreader" == "fenrir" ]]; then if [[ "$screenreader" == "fenrir" ]]; then
sudo systemctl disable --now espeakup.service sudo "${sudoFlags[@]}" systemctl disable --now espeakup.service
sudo systemctl enable --now fenrirscreenreader.service sudo "${sudoFlags[@]}" systemctl enable --now fenrirscreenreader.service
fi fi
fi fi

View File

@ -21,15 +21,15 @@ mapfile -t cities < <(timedatectl --no-pager list-timezones | grep "$region" | c
$(for i in ${cities[@]} ; do echo "$i";echo "$i";done) --stdout) $(for i in ${cities[@]} ; do echo "$i";echo "$i";done) --stdout)
# Set the timezone # Set the timezone
sudo timedatectl set-timezone ${region}/${city} sudo "${sudoFlags[@]}" timedatectl set-timezone ${region}/${city}
if [[ -f /etc/localtime ]]; then if [[ -f /etc/localtime ]]; then
sudo rm /etc/localtime sudo "${sudoFlags[@]}" rm /etc/localtime
fi fi
sudo ln -s /usr/share/zoneinfo/${region}/${city} /etc/localtime sudo "${sudoFlags[@]}" ln -s /usr/share/zoneinfo/${region}/${city} /etc/localtime
# Make sure we are syncing with the internet # Make sure we are syncing with the internet
echo "Setting up ntpd" echo "Setting up ntpd"
sudo timedatectl set-ntp false sudo "${sudoFlags[@]}" timedatectl set-ntp false
sudo systemctl stop ntpd sudo "${sudoFlags[@]}" systemctl stop ntpd
sudo ntpd -Ggq &> /dev/null sudo "${sudoFlags[@]}" ntpd -Ggq &> /dev/null
sudo systemctl enable ntpd --now sudo "${sudoFlags[@]}" systemctl enable ntpd --now