You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
584 B
24 lines
584 B
#!/usr/bin/env -S guix shell bash -- bash |
|
|
|
set -x |
|
|
|
host_conf=$(hostname).scm |
|
|
|
cd /data/xhrpb-guix-config |
|
|
|
if test -f "$host_conf" |
|
then |
|
if ! diff "$host_conf" "/etc/config.scm" >/dev/null 2>&1 |
|
then |
|
cp -v "/etc/config.scm" "/etc/config.scm.backup" |
|
cp -v "$host_conf" "/etc/config.scm" |
|
if guix system reconfigure /etc/config.scm --allow-downgrades |
|
then |
|
echo "guix system reconfigure /etc/config.scm success" |
|
else |
|
echo "guix system reconfigure /etc/config.scm failure" |
|
cp -v "/etc/config.scm.backup" "/etc/config.scm" |
|
exit 1 |
|
fi |
|
fi |
|
fi
|
|
|