mirror of
https://github.com/notwa/rc
synced 2024-11-05 15:49:02 -08:00
switch from ~/opt/local/bin
to ~/.local/bin
this is where systemd already expects things to be, so this complements the OS instead of fighting it.
This commit is contained in:
parent
bee00a1168
commit
44b0272097
3 changed files with 11 additions and 5 deletions
|
@ -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
|
||||
|
|
4
install
4
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"
|
||||
|
|
|
@ -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 <<EOF
|
||||
[ -s ~/.local/bin/noccom ] || cat > ~/.local/bin/noccom <<EOF
|
||||
#!/usr/bin/env perl
|
||||
|
||||
\$/ = undef;
|
||||
|
@ -51,7 +51,7 @@ s#(^|\\n)\\s+#\$1#gs;
|
|||
print;
|
||||
EOF
|
||||
|
||||
perl ~/opt/local/bin/noccom "$@"
|
||||
perl ~/.local/bin/noccom "$@"
|
||||
}
|
||||
|
||||
[ -n "${preload+-}" ] || noccom "$@"
|
||||
|
|
Loading…
Reference in a new issue