about summary refs log tree commit diff
path: root/profile/.profile
diff options
context:
space:
mode:
authorAzat Bahawi <azat@bahawi.net>1970-01-01 03:00:00 +0300
committerAzat Bahawi <azat@bahawi.net>2022-09-20 11:51:54 +0300
commit38bab29776950ac2364ed64195b89887717c33de (patch)
treeedaaf366a55dbe96d268019124536bc504c64e87 /profile/.profile
chore: init HEAD master
Diffstat (limited to 'profile/.profile')
-rw-r--r--profile/.profile26
1 files changed, 26 insertions, 0 deletions
diff --git a/profile/.profile b/profile/.profile
new file mode 100644
index 0000000..b05eafb
--- /dev/null
+++ b/profile/.profile
@@ -0,0 +1,26 @@
+#!/bin/sh
+
+if [ "$(umask)" = "000" ] || [ "$(umask)" = "0000" ]
+then
+    umask 0022
+fi
+
+if [ -f "/etc/profile.env" ]
+then
+    # shellcheck disable=SC1091
+    . "/etc/profile.env"
+fi
+
+for i in /etc/profile.d/*.sh
+do
+    # shellcheck disable=SC1090
+    [ -r "$i" ] && . "$i"
+done
+
+for i in "${HOME}"/.profile.d/*.sh
+do
+    # shellcheck disable=SC1090
+    [ -r "$i" ] && . "$i"
+done
+
+export PROFILE_SOURCED="1"

Consider giving Nix/NixOS a try! <3