From d39c9078047a11628de17247ebc3b8e79a639f3f Mon Sep 17 00:00:00 2001 From: Dawson Pleasant Date: Jul 24 2025 00:19:54 +0000 Subject: [PATCH 1/2] fix: Fix EOL for shell scripts - The './build.sh' file was committed with CRLF. A '.gitignore' file was added to ensure EOL stays consistent for shell scripts. --- diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..f181550 --- /dev/null +++ b/.gitattributes @@ -0,0 +1 @@ +*.sh text eol=lf diff --git a/build.sh b/build.sh index 01c5b0c..f4ecfe4 100755 --- a/build.sh +++ b/build.sh @@ -1,46 +1,46 @@ -#!/bin/sh - -image="docker.io/antora/antora" -cmd="--html-url-extension-style=indexify site.yml" - -if [ "$(uname)" = "Darwin" ]; then - # Running on macOS. - # Let's assume that the user has the Docker CE installed - # which doesn't require a root password. - echo "" - echo "This build script is using Docker container runtime to run the build in an isolated environment." - echo "" - docker run --rm -it -v "$(pwd):/antora" $image $cmd - -elif [ "$(expr substr "$(uname -s)" 1 5)" = "Linux" ]; then - # Running on Linux. - # Check whether podman is available, else fall back to docker - # which requires root. - - if [ -f /usr/bin/podman ]; then - echo "" - echo "This build script is using Podman to run the build in an isolated environment." - echo "" - podman run --rm -it -v "$(pwd):/antora:z" $image $cmd - - elif [ -f /usr/bin/docker ]; then - echo "" - echo "This build script is using Docker to run the build in an isolated environment." - echo "" - - if groups | grep -wq "docker"; then - docker run --rm -it -v "$(pwd):/antora:z" $image $cmd - else - echo "" - echo "This build script is using $runtime to run the build in an isolated environment. You might be asked for your password." - echo "You can avoid this by adding your user to the 'docker' group, but be aware of the security implications. See https://docs.docker.com/install/linux/linux-postinstall/." - echo "" - sudo docker run --rm -it -v "$(pwd):/antora:z" $image $cmd - fi - else - echo "" - echo "Error: Container runtime haven't been found on your system. Fix it by:" - echo "$ sudo dnf install podman" - exit 1 - fi -fi +#!/bin/sh + +image="docker.io/antora/antora" +cmd="--html-url-extension-style=indexify site.yml" + +if [ "$(uname)" = "Darwin" ]; then + # Running on macOS. + # Let's assume that the user has the Docker CE installed + # which doesn't require a root password. + echo "" + echo "This build script is using Docker container runtime to run the build in an isolated environment." + echo "" + docker run --rm -it -v "$(pwd):/antora" $image $cmd + +elif [ "$(expr substr "$(uname -s)" 1 5)" = "Linux" ]; then + # Running on Linux. + # Check whether podman is available, else fall back to docker + # which requires root. + + if [ -f /usr/bin/podman ]; then + echo "" + echo "This build script is using Podman to run the build in an isolated environment." + echo "" + podman run --rm -it -v "$(pwd):/antora:z" $image $cmd + + elif [ -f /usr/bin/docker ]; then + echo "" + echo "This build script is using Docker to run the build in an isolated environment." + echo "" + + if groups | grep -wq "docker"; then + docker run --rm -it -v "$(pwd):/antora:z" $image $cmd + else + echo "" + echo "This build script is using $runtime to run the build in an isolated environment. You might be asked for your password." + echo "You can avoid this by adding your user to the 'docker' group, but be aware of the security implications. See https://docs.docker.com/install/linux/linux-postinstall/." + echo "" + sudo docker run --rm -it -v "$(pwd):/antora:z" $image $cmd + fi + else + echo "" + echo "Error: Container runtime haven't been found on your system. Fix it by:" + echo "$ sudo dnf install podman" + exit 1 + fi +fi From 47848089b28114e3ca7f09798e822fd637893b09 Mon Sep 17 00:00:00 2001 From: Dawson Pleasant Date: Jul 24 2025 00:22:23 +0000 Subject: [PATCH 2/2] fix: Fix bluetoothctl cmd name - Instances of 'bluetoothctrl' were changed to 'bluetoothctl'. - That is the correct command on Fedora 42 and was likely just a typo. --- diff --git a/modules/ROOT/pages/controllers.adoc b/modules/ROOT/pages/controllers.adoc index 6ffc6c5..04cf4af 100644 --- a/modules/ROOT/pages/controllers.adoc +++ b/modules/ROOT/pages/controllers.adoc @@ -25,11 +25,11 @@ Controller should work as soon as you plug it to your machine via USB cable. NOTE: There were identified issues with Bluetooth connection stability and input lag. -The guide below recommends connecting your controller using the `bluetoothctrl` tool in the terminal. While you can still try to connect using the graphical Bluetooth manager, the method described below is suggested, as it is generally more stable. +The guide below recommends connecting your controller using the `bluetoothctl` tool in the terminal. While you can still try to connect using the graphical Bluetooth manager, the method described below is suggested, as it is generally more stable. 1. Open your terminal -2. Run the `bluetoothctrl` command and confirm that you see `[bluetoothctrl]>` at the beginning of the new line. This means you are now using the bluetoothctrl application. +2. Run the `bluetoothctl` command and confirm that you see `[bluetoothctl]>` at the beginning of the new line. This means you are now using the bluetoothctl application. 3. Type `scan on` and press Enter to search for new devices. @@ -171,10 +171,10 @@ Controller should work as soon as you plug it to your machine via USB cable. NOTE: There were identified issues with Bluetooth connection stability and input lag. -The guide below recommends connecting your controller via `bluetoothctrl`. While you can still try to connect via a dedicated GUI Bluetooth manager, the method described below is recommended because it is more stable. +The guide below recommends connecting your controller via `bluetoothctl`. While you can still try to connect via a dedicated GUI Bluetooth manager, the method described below is recommended because it is more stable. 1. Open your terminal -2. Run the bluetoothctrl command and confirm that you see `[bluetoothctrl]>` at the beginning of the new line. This means you are using the bluetoothctrl application. +2. Run the bluetoothctl command and confirm that you see `[bluetoothctl]>` at the beginning of the new line. This means you are using the bluetoothctl application. 3. Put your Nintendo Switch Pro controller into pairing mode: * Press and hold the PlayStation button and the Share button (the smaller button on the top left side of the touchpad) simultaneously for a few seconds.