mirror of
https://github.com/notwa/rc
synced 2025-03-14 06:02:50 -07: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.
|
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:
|
# clean up problematic, potentially-inherited exports:
|
||||||
unset PREFIX CC CPP CXX LD CFLAGS CPPFLAGS CXXFLAGS LDFLAGS
|
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
|
fi
|
||||||
|
|
||||||
# delete any directory structure that may have been included with the OS.
|
# 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"
|
! [ -d "$d" ] || rmdir "$f"
|
||||||
done
|
done
|
||||||
|
|
||||||
# create instead my preferred directory structure.
|
# 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.
|
### strip C-like comments; both multi-line and single-line.
|
||||||
# the first expression is taken from this FAQ:
|
# 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
|
# 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
|
#!/usr/bin/env perl
|
||||||
|
|
||||||
\$/ = undef;
|
\$/ = undef;
|
||||||
|
@ -51,7 +51,7 @@ s#(^|\\n)\\s+#\$1#gs;
|
||||||
print;
|
print;
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
perl ~/opt/local/bin/noccom "$@"
|
perl ~/.local/bin/noccom "$@"
|
||||||
}
|
}
|
||||||
|
|
||||||
[ -n "${preload+-}" ] || noccom "$@"
|
[ -n "${preload+-}" ] || noccom "$@"
|
||||||
|
|
Loading…
Add table
Reference in a new issue