home · contact · privacy
Improve.
authorChristian Heller <c.heller@plomlompom.de>
Fri, 21 Mar 2025 18:09:10 +0000 (19:09 +0100)
committerChristian Heller <c.heller@plomlompom.de>
Fri, 21 Mar 2025 18:09:10 +0000 (19:09 +0100)
testing/home/all/.nonpath_bins/plomlib.sh [new file with mode: 0644]
testing/home/all/.profile
testing/home/desktop/.nonpath_bins/plomlib.sh [deleted file]
testing/home/desktop/.nonpath_bins/plomlib.sh.desktop [new file with mode: 0644]

diff --git a/testing/home/all/.nonpath_bins/plomlib.sh b/testing/home/all/.nonpath_bins/plomlib.sh
new file mode 100644 (file)
index 0000000..61907b2
--- /dev/null
@@ -0,0 +1,7 @@
+dot_shell_file_variants () {
+    for FILE in ${1}\.*; do
+        if [ -f "${FILE}" ]; then
+            . "${FILE}"
+        fi
+    done
+}
index 3e0f3bd4440073f1ac98709912c664a821144d06..1039ec77d6d9f9f2b48a931201c29b43c467727f 100644 (file)
@@ -7,6 +7,8 @@
 # useful for providing environment variables to non-shell applications started
 # within a login session.
 
+. "${HOME}"/.nonpath_bins/plomlib.sh
+
 eval $(ssh-agent) && ssh-add
 
 PATH_BASHRC="${HOME}/.bashrc"
@@ -19,8 +21,4 @@ PATH_LOCAL_BIN="${HOME}/.local/bin"
 export PATH
 
 # include others
-for FILE in ${HOME}/\.profile\.*; do
-    if [ -f "${FILE}" ]; then
-        . "${FILE}"
-    fi
-done
+dot_shell_file_variants "${HOME}/\.profile"
diff --git a/testing/home/desktop/.nonpath_bins/plomlib.sh b/testing/home/desktop/.nonpath_bins/plomlib.sh
deleted file mode 100644 (file)
index 43e9aca..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-get_passphrase() {
-    stty -echo
-    printf "\nPassphrase: "
-    read PASSPHRASE
-    stty echo
-    echo "" # newline so user knows their input return was accepted
-}
-
diff --git a/testing/home/desktop/.nonpath_bins/plomlib.sh.desktop b/testing/home/desktop/.nonpath_bins/plomlib.sh.desktop
new file mode 100644 (file)
index 0000000..43e9aca
--- /dev/null
@@ -0,0 +1,8 @@
+get_passphrase() {
+    stty -echo
+    printf "\nPassphrase: "
+    read PASSPHRASE
+    stty echo
+    echo "" # newline so user knows their input return was accepted
+}
+