From 7b9b201d8fd4e2f095c51beb7107e210f6ea2fa2 Mon Sep 17 00:00:00 2001
From: Salt <rehashedsalt@cock.li>
Date: Thu, 26 Sep 2019 03:04:40 -0500
Subject: [PATCH] .bin, .profile: Update, add minor security checks to PATH
 patching

---
 .bin     | 2 +-
 .profile | 7 ++++++-
 2 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/.bin b/.bin
index aa1cc362..2d62cfab 160000
--- a/.bin
+++ b/.bin
@@ -1 +1 @@
-Subproject commit aa1cc36264073fdf43cff7fe740844356e9ef0fe
+Subproject commit 2d62cfabbf1b226e173b7e20a1d49edba820b7be
diff --git a/.profile b/.profile
index 91549aef..cfa1d6bd 100755
--- a/.profile
+++ b/.profile
@@ -25,7 +25,12 @@
 _baseshell="$(basename -- "$0")"
 
 # Patch PATH
-desiredpath="/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/bin:/sbin:/usr/local/games:/usr/games:$HOME/.bin:$HOME/.local/bin"
+desiredpath="/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/bin:/sbin:/usr/local/games:/usr/games"
+for dir in "$HOME/.bin" "$HOME/.local/bin"; do
+	if [ -d "$dir" ] && [ -O "$dir" ]; then
+		desiredpath="$desiredpath:$dir"
+	fi
+done
 IFS=":"
 for path in $desiredpath; do
 	PATH="${PATH#*$path}"