me
/
guix
Archived
1
0
Fork 0

guix-install.sh: Undo some bugs introduced by shellcheck.

* etc/guix-install.sh: Unquote all file names containing ~root.
master
Tobias Geerinckx-Rice 2021-11-07 20:09:46 +01:00
parent a0f1476e8f
commit 071f4e3db3
No known key found for this signature in database
GPG Key ID: 0DB0FF884F556D79
1 changed files with 10 additions and 10 deletions

View File

@ -345,11 +345,11 @@ sys_create_store()
mv "${tmp_path}/gnu" / mv "${tmp_path}/gnu" /
_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
ln -sf /var/guix/profiles/per-user/root/current-guix \ ln -sf /var/guix/profiles/per-user/root/current-guix \
"~root/.config/guix/current" ~root/.config/guix/current
GUIX_PROFILE="~root/.config/guix/current" GUIX_PROFILE=~root/.config/guix/current
# shellcheck disable=SC1090 # shellcheck disable=SC1090
source "${GUIX_PROFILE}/etc/profile" source "${GUIX_PROFILE}/etc/profile"
_msg "${PAS}activated root profile at ${GUIX_PROFILE}" _msg "${PAS}activated root profile at ${GUIX_PROFILE}"
@ -405,7 +405,7 @@ sys_enable_guix_daemon()
case "$INIT_SYS" in case "$INIT_SYS" in
upstart) upstart)
{ initctl reload-configuration; { initctl reload-configuration;
cp "~root/.config/guix/current/lib/upstart/system/guix-daemon.conf" \ cp ~root/.config/guix/current/lib/upstart/system/guix-daemon.conf \
/etc/init/ && /etc/init/ &&
configure_substitute_discovery /etc/init/guix-daemon.conf && configure_substitute_discovery /etc/init/guix-daemon.conf &&
start guix-daemon; } && start guix-daemon; } &&
@ -415,15 +415,15 @@ sys_enable_guix_daemon()
{ # systemd .mount units must be named after the target directory. { # systemd .mount units must be named after the target directory.
# Here we assume a hard-coded name of /gnu/store. # Here we assume a hard-coded name of /gnu/store.
# XXX Work around <https://issues.guix.gnu.org/41356> until next release. # XXX Work around <https://issues.guix.gnu.org/41356> until next release.
if [ -f "~root/.config/guix/current/lib/systemd/system/gnu-store.mount" ]; then if [ -f ~root/.config/guix/current/lib/systemd/system/gnu-store.mount ]; then
cp "~root/.config/guix/current/lib/systemd/system/gnu-store.mount" \ cp ~root/.config/guix/current/lib/systemd/system/gnu-store.mount \
/etc/systemd/system/; /etc/systemd/system/;
chmod 664 /etc/systemd/system/gnu-store.mount; chmod 664 /etc/systemd/system/gnu-store.mount;
systemctl daemon-reload && systemctl daemon-reload &&
systemctl enable gnu-store.mount; systemctl enable gnu-store.mount;
fi fi
cp "~root/.config/guix/current/lib/systemd/system/guix-daemon.service" \ cp ~root/.config/guix/current/lib/systemd/system/guix-daemon.service \
/etc/systemd/system/; /etc/systemd/system/;
chmod 664 /etc/systemd/system/guix-daemon.service; chmod 664 /etc/systemd/system/guix-daemon.service;
@ -447,7 +447,7 @@ sys_enable_guix_daemon()
;; ;;
sysv-init) sysv-init)
{ mkdir -p /etc/init.d; { mkdir -p /etc/init.d;
cp "~root/.config/guix/current/etc/init.d/guix-daemon" \ cp ~root/.config/guix/current/etc/init.d/guix-daemon \
/etc/init.d/guix-daemon; /etc/init.d/guix-daemon;
chmod 775 /etc/init.d/guix-daemon; chmod 775 /etc/init.d/guix-daemon;
@ -460,7 +460,7 @@ sys_enable_guix_daemon()
;; ;;
openrc) openrc)
{ mkdir -p /etc/init.d; { mkdir -p /etc/init.d;
cp "~root/.config/guix/current/etc/openrc/guix-daemon" \ cp ~root/.config/guix/current/etc/openrc/guix-daemon \
/etc/init.d/guix-daemon; /etc/init.d/guix-daemon;
chmod 775 /etc/init.d/guix-daemon; chmod 775 /etc/init.d/guix-daemon;
@ -492,7 +492,7 @@ sys_authorize_build_farms()
if prompt_yes_no "Permit downloading pre-built package binaries from the \ if prompt_yes_no "Permit downloading pre-built package binaries from the \
project's build farm? (yes/no)"; then project's build farm? (yes/no)"; then
guix archive --authorize \ guix archive --authorize \
< "~root/.config/guix/current/share/guix/ci.guix.gnu.org.pub" \ < ~root/.config/guix/current/share/guix/ci.guix.gnu.org.pub \
&& _msg "${PAS}Authorized public key for ci.guix.gnu.org" && _msg "${PAS}Authorized public key for ci.guix.gnu.org"
else else
_msg "${INF}Skipped authorizing build farm public keys" _msg "${INF}Skipped authorizing build farm public keys"