Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

More intuitive version matching #69

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Roy-Orbison
Copy link
Contributor

Avoids many issues with regex and glob patterns in version arguments matching incorrectly. Prevents invalid versions being requested from remote source. Always provides opportunity to confirm version being installed.

Fixes #58.

Avoids many issues with regex and glob patterns in version arguments
matching incorrectly. Prevents invalid versions being requested from
remote source. Always provides opportunity to confirm version being
installed.

Signed-off-by: Roy-Orbison <[email protected]>
@Roy-Orbison
Copy link
Contributor Author

For testing, I have been using these extra lines to avoid thrashing & waiting for the remote:

diff --git a/ubuntu-mainline-kernel.sh b/ubuntu-mainline-kernel.sh
index fc9c0c3..f60f946 100755
--- a/ubuntu-mainline-kernel.sh
+++ b/ubuntu-mainline-kernel.sh
@@ -369,6 +369,7 @@ latest_local_version() {
 }

 remote_html_cache=""
+remote_html_cache="$(cat < remote_html_cache)"
 remote_versions_read=0

 normalize_version_for_match() {
@@ -412,6 +413,7 @@ load_remote_versions () {
         if [ -z "$remote_html_cache" ]; then
           [ -z "$2" ] && logn "Downloading index from $ppa_host"
           remote_html_cache=$(download $ppa_host $ppa_index)
+          cat <<<"$remote_html_cache" > remote_html_cache
           [ -z "$2" ] && log
         fi

@@ -609,6 +611,7 @@ Optional:
         else
             log
         fi
+        exit

         [ ! -d "$workdir" ] && {
             mkdir -p "$workdir" 2>/dev/null

I used commands like these:

./ubuntu-mainline-kernel.sh -r 4.19 --rc
./ubuntu-mainline-kernel.sh -i 4.19 -do

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Potential to install wrong kernel?
1 participant