Skip to content

Commit

Permalink
fix: patch and regex for latest breaking changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Barabazs committed Apr 21, 2023
1 parent 4fdc18b commit affb206
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 17 deletions.
10 changes: 5 additions & 5 deletions displaylink-debian.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ if [[ $versions =~ Beta ]]; then
dlurl="https://www.synaptics.com/$(wget -q -O - https://www.synaptics.com/products/displaylink-graphics/downloads/ubuntu | grep -B 2 $version'-Release' | perl -pe '($_)=/<a href="\/([^"]+)"[^>]+class="download-link"/')"
driver_url="https://www.synaptics.com/$(wget -q -O - ${dlurl} | grep '<a class="no-link"' | head -n 1 | perl -pe '($_)=/href="\/([^"]+)"/')"
else
version=`wget -q -O - https://www.synaptics.com/products/displaylink-graphics/downloads/ubuntu | grep "<p>Release: " | head -n 1 | perl -pe '($_)=/([0-9]+([.][0-9]+)+)/'`
dlurl="https://www.synaptics.com/$(wget -q -O - https://www.synaptics.com/products/displaylink-graphics/downloads/ubuntu | grep 'class="download-link"' | head -n 1 | perl -pe '($_)=/<a href="\/([^"]+)"[^>]+class="download-link"/')"
version=`wget -q -O - https://www.synaptics.com/products/displaylink-graphics/downloads/ubuntu | grep "<p>Release: " | head -n 1 | perl -pe '($_)=/([0-9]+([.][0-9]+)+)/; exit if $. > 1;'`
dlurl="https://www.synaptics.com/$(wget -q -O - https://www.synaptics.com/products/displaylink-graphics/downloads/ubuntu | grep -B 2 $version'-Release' | perl -pe '($_)=/<a href="\/([^"]+)"[^>]+class="download-link"/')"
driver_url="https://www.synaptics.com/$(wget -q -O - ${dlurl} | grep '<a class="no-link"' | head -n 1 | perl -pe '($_)=/href="\/([^"]+)"/')"
fi
driver_dir=$version
Expand Down Expand Up @@ -440,9 +440,9 @@ separator
echo -e "\nPreparing for install\n"
test -d $driver_dir && /bin/rm -Rf $driver_dir
unzip -d $driver_dir DisplayLink_Ubuntu_${version}.zip
chmod +x $driver_dir/displaylink-driver-${version}-[0-9]*.[0-9]*.run
./$driver_dir/displaylink-driver-${version}-[0-9]*.[0-9]*.run --keep --noexec
mv displaylink-driver-${version}-*[0-9]*.[0-9]*/ $driver_dir/displaylink-driver-${version}
chmod +x $driver_dir/displaylink-driver-${version}[.\d]*-[0-9]*.[0-9]*.run
./$driver_dir/displaylink-driver-${version}[.\d]*-[0-9]*.[0-9]*.run --keep --noexec
mv displaylink-driver-${version}[.\d]*-*[0-9]*.[0-9]*/ $driver_dir/displaylink-driver-${version}
# get sysinitdaemon
sysinitdaemon=$(sysinitdaemon_get)

Expand Down
27 changes: 15 additions & 12 deletions resources/displaylink-installer.patch
Original file line number Diff line number Diff line change
@@ -1,22 +1,25 @@
--- displaylink-installer.sh
+++ displaylink-installer.sh
@@ -526,13 +528,13 @@
@@ -237,15 +237,15 @@
printf '\n%s\n%s\n' "Please read the FAQ" \
"http://support.displaylink.com/knowledgebase/topics/103927-troubleshooting-ubuntu"

- printf '\n%s\n\n%s\n' "Installation complete!" \
- "Please reboot your computer if you're intending to use Xorg."
-
- printf "\n\n%s\n%s\n%s\n\n\n" "Reboot required" "DisplayLink driver installed successfully." \
- "Please reboot your computer to ensure the proper functioning of the software." \
- && prompt_yes_no "Do you want to reboot now?" \
- && reboot
+ # printf "\n\n%s\n%s\n%s\n\n\n" "Reboot required" "DisplayLink driver installed successfully." \
+ # "Please reboot your computer to ensure the proper functioning of the software." \
+ # && prompt_yes_no "Do you want to reboot now?" \
+ # && reboot

- "$NOREBOOT" && exit 0
-
+ # "$NOREBOOT" && exit 0

- xorg_running || exit 0
- prompt_yes_no "Xorg is running. Do you want to reboot now?" && reboot
+# printf '\n%s\n\n%s\n' "Installation complete!" \
+# "Please reboot your computer if you're intending to use Xorg."
+#
+# "$NOREBOOT" && exit 0
+#
+# xorg_running || exit 0
+# prompt_yes_no "Xorg is running. Do you want to reboot now?" && reboot
+ # xorg_running || exit 0
+ # prompt_yes_no "Xorg is running. Do you want to reboot now?" && reboot
exit 0
}

0 comments on commit affb206

Please sign in to comment.