aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaxim Cournoyer <maxim.cournoyer@gmail.com>2021-05-04 22:48:20 -0400
committerMaxim Cournoyer <maxim.cournoyer@gmail.com>2021-05-05 11:01:07 -0400
commit74009c4cf04be4872be7bf985b045b922d506be3 (patch)
treef834b2c65ac543184b88cb60bccca50068a34b38
parent5b0ce3393b7f8853d3154ede930482446a7c0376 (diff)
downloadguix-74009c4cf04be4872be7bf985b045b922d506be3.tar.gz
guix-74009c4cf04be4872be7bf985b045b922d506be3.zip
guix-install.sh: Exit early if Guix is already installed.
* etc/guix-install.sh (sys_create_store): Move the check & exit before The Guix binary archive is unpacked. Re-indent tar extraction command.
-rwxr-xr-xetc/guix-install.sh16
1 files changed, 7 insertions, 9 deletions
diff --git a/etc/guix-install.sh b/etc/guix-install.sh
index 9f7bd2038a..6a799fa823 100755
--- a/etc/guix-install.sh
+++ b/etc/guix-install.sh
@@ -322,20 +322,18 @@ sys_create_store()
_debug "--- [ ${FUNCNAME[0]} ] ---"
- cd "$tmp_path"
- tar --extract \
- --file "$pkg" &&
- _msg "${PAS}unpacked archive"
-
if [[ -e "/var/guix" || -e "/gnu" ]]; then
_err "${ERR}A previous Guix installation was found. Refusing to overwrite."
exit 1
- else
- _msg "${INF}Installing /var/guix and /gnu..."
- mv "${tmp_path}/var/guix" /var/
- mv "${tmp_path}/gnu" /
fi
+ cd "$tmp_path"
+ tar --extract --file "$pkg" && _msg "${PAS}unpacked archive"
+
+ _msg "${INF}Installing /var/guix and /gnu..."
+ mv "${tmp_path}/var/guix" /var/
+ mv "${tmp_path}/gnu" /
+
_msg "${INF}Linking the root user's profile"
mkdir -p "~root/.config/guix"
ln -sf /var/guix/profiles/per-user/root/current-guix \
and in a PTY....Mathieu Othacehe 2022-10-17installer: Factorize url-alive? in internet check....Andrew Tropin 2022-10-17installer: Relax internet check availability criteria....aleksandr barakin 2022-10-17guix: Fix typos....Julien Lepiller 2022-10-13installer: partition: Add a confirmation page before formatting....Mathieu Othacehe 2022-09-24installer: tests: Fix typo....Mathieu Othacehe 2022-09-24installer: Fix configuration edition during testing....Mathieu Othacehe 2022-09-22installer: Exit console-services page with abort-to-prompt....Josselin Poiret 2022-09-22installer: Ensure luks devices are open when mounting partitions....Josselin Poiret 2022-09-22installer: Return partitions with crypt password as step result....Josselin Poiret 2022-09-22installer: Move <secret> to utils and use it for crypt passwords....Josselin Poiret 2022-09-01installer: Fix segfault on double logical partition removal....Josselin Poiret 2022-08-14installer: parted: Don't export WITH-DELAY-DEVICE-IN-USE?....Tobias Geerinckx-Rice 2022-08-08installer: Add comments and vertical space to the generated config....Ludovic Courtès 2022-08-08installer: Render the final configuration with (guix read-print)....Ludovic Courtès 2022-08-05installer: parted: Call set-system before set-flags....Mathieu Othacehe 2022-08-05installer: parted: Log partition flags....Mathieu Othacehe