mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2025-01-23 19:19:20 -05:00
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.
This commit is contained in:
parent
5b0ce3393b
commit
74009c4cf0
1 changed files with 7 additions and 9 deletions
|
@ -322,19 +322,17 @@ sys_create_store()
|
||||||
|
|
||||||
_debug "--- [ ${FUNCNAME[0]} ] ---"
|
_debug "--- [ ${FUNCNAME[0]} ] ---"
|
||||||
|
|
||||||
cd "$tmp_path"
|
|
||||||
tar --extract \
|
|
||||||
--file "$pkg" &&
|
|
||||||
_msg "${PAS}unpacked archive"
|
|
||||||
|
|
||||||
if [[ -e "/var/guix" || -e "/gnu" ]]; then
|
if [[ -e "/var/guix" || -e "/gnu" ]]; then
|
||||||
_err "${ERR}A previous Guix installation was found. Refusing to overwrite."
|
_err "${ERR}A previous Guix installation was found. Refusing to overwrite."
|
||||||
exit 1
|
exit 1
|
||||||
else
|
fi
|
||||||
|
|
||||||
|
cd "$tmp_path"
|
||||||
|
tar --extract --file "$pkg" && _msg "${PAS}unpacked archive"
|
||||||
|
|
||||||
_msg "${INF}Installing /var/guix and /gnu..."
|
_msg "${INF}Installing /var/guix and /gnu..."
|
||||||
mv "${tmp_path}/var/guix" /var/
|
mv "${tmp_path}/var/guix" /var/
|
||||||
mv "${tmp_path}/gnu" /
|
mv "${tmp_path}/gnu" /
|
||||||
fi
|
|
||||||
|
|
||||||
_msg "${INF}Linking the root user's profile"
|
_msg "${INF}Linking the root user's profile"
|
||||||
mkdir -p "~root/.config/guix"
|
mkdir -p "~root/.config/guix"
|
||||||
|
|
Loading…
Reference in a new issue