guix-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug#42816] [PATCH 1/2] guix-install.sh: Increase compatibility


From: Morgan . J . Smith
Subject: [bug#42816] [PATCH 1/2] guix-install.sh: Increase compatibility
Date: Tue, 11 Aug 2020 23:38:41 -0400

From: Morgan Smith <Morgan.J.Smith@outlook.com>

These fixes allow the script to be run using the binaries found on Alpine
Linux 3.12.0-x86_64.

* etc/guix-install.sh (guix_get_bin_list): Change grep to use extended regex
instead of perl regex. Grep using extended regex is POSIX while grep using
perl regex is not.

* etc/guix-install.sh (sys_create_store): Remove --warning flag as it is
unavailable on Alpine Linux
---

So for this change I had to learn perl regex. Then, once I understood
exactly what it did I recreated it from scratch not realizing that it
was almost the same as what was there before. I'm pretty sure there
are no differences between [[:digit:]] and [0-9], I just tend to use
[[:digit:]] because it's flashy

 etc/guix-install.sh | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/etc/guix-install.sh b/etc/guix-install.sh
index 72dc3839e8..06edbaaffd 100755
--- a/etc/guix-install.sh
+++ b/etc/guix-install.sh
@@ -212,7 +212,7 @@ guix_get_bin_list()
         | sort -Vu)")
 
     latest_ver="$(echo "$bin_ver_ls" \
-                       | grep -oP "([0-9]{1,2}\.){2}[0-9]{1,2}" \
+                       | grep -oE "([0-9]{1,2}\.){2}[0-9]{1,2}" \
                        | tail -n1)"
 
     default_ver="guix-binary-${latest_ver}.${ARCH_OS}"
@@ -268,8 +268,7 @@ sys_create_store()
     _debug "--- [ $FUNCNAME ] ---"
 
     cd "$tmp_path"
-    tar --warning=no-timestamp \
-        --extract \
+    tar --extract \
         --file "$pkg" &&
     _msg "${PAS}unpacked archive"
 
-- 
2.28.0






reply via email to

[Prev in Thread] Current Thread [Next in Thread]