diff --git a/home/shrc b/home/shrc index 2d59618..4ee7ea3 100644 --- a/home/shrc +++ b/home/shrc @@ -52,7 +52,13 @@ ROPATH() { umask 022 # umask should be reset else pip might make faulty installations. -ADDPATH "$HOME/opt/local/bin" +if [ -d "$HOME/opt/local/bin" ]; then + printf 'Warning: You have a %s directory\n consider moving it to %s\n' \ + '~/opt/local/bin' '~/.local/bin' >&2 + ADDPATH "$HOME/opt/local/bin" +else + ADDPATH "$HOME/.local/bin" +fi # clean up problematic, potentially-inherited exports: unset PREFIX CC CPP CXX LD CFLAGS CPPFLAGS CXXFLAGS LDFLAGS diff --git a/install b/install index 8336003..ae1e85b 100755 --- a/install +++ b/install @@ -159,9 +159,9 @@ if ! [ -e .bash_profile ] || ! grep -qF .bashrc .bash_profile; then fi # delete any directory structure that may have been included with the OS. -for d in Desktop Documents Downloads Music Pictures Public Templates Video Videos; do +for d in bin Desktop Documents Downloads Music Pictures Public Templates Video Videos; do ! [ -d "$d" ] || rmdir "$f" done # create instead my preferred directory structure. -mkdir -p opt/local/bin src work play || die "failed to create directories" +mkdir -p .local/bin src work play || die "failed to create directories" diff --git a/sh/noccom b/sh/noccom index c73414c..512feb2 100755 --- a/sh/noccom +++ b/sh/noccom @@ -10,7 +10,7 @@ noccom() { ### @- ### strip C-like comments; both multi-line and single-line. # the first expression is taken from this FAQ: # https://perldoc.perl.org/perlfaq6.html#How-do-I-use-a-regular-expression-to-strip-C-style-comments-from-a-file%3f - [ -s ~/opt/local/bin/noccom ] || cat > ~/opt/local/bin/noccom < ~/.local/bin/noccom <