summaryrefslogtreecommitdiff
path: root/etc/guix-install.sh
diff options
context:
space:
mode:
authorPrafulla Giri <pratheblackdiamond@gmail.com>2020-01-21 12:34:10 +0545
committerLudovic Courtès <ludo@gnu.org>2020-01-26 23:21:39 +0100
commit29ba58c0ef3c1e4a6154a133203c9c09d138fd32 (patch)
tree6a770d5ddb4188057e64b68b50dabe327416b003 /etc/guix-install.sh
parent5c03516a6bc6bff69b99ec8d29a87603685f7041 (diff)
guix-install.sh: Create /etc/profile.d if it does not exist
* etc/guix-install.sh (sys_create_init_profile): Add code to create /etc/profile.d if it somehow does not exist; the function still carries on because it is possible that /etc/profile is still configured to read the *.sh files from /etc/profile.d, if they exist. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
Diffstat (limited to 'etc/guix-install.sh')
-rwxr-xr-xetc/guix-install.sh1
1 files changed, 1 insertions, 0 deletions
diff --git a/etc/guix-install.sh b/etc/guix-install.sh
index ff97c78549..0e677c2b90 100755
--- a/etc/guix-install.sh
+++ b/etc/guix-install.sh
@@ -395,6 +395,7 @@ sys_authorize_build_farms()
sys_create_init_profile()
{ # Create /etc/profile.d/guix.sh for better desktop integration
+ [ -d "/etc/profile.d" ] || mkdir /etc/profile.d # Just in case
cat <<"EOF" > /etc/profile.d/guix.sh
# _GUIX_PROFILE: `guix pull` profile
_GUIX_PROFILE="$HOME/.config/guix/current"