1
0
Fork 0
mirror of https://github.com/notwa/rc synced 2025-02-05 07:43:22 -08:00

remove dotless since we're not strictly POSIX anyway

This commit is contained in:
Connor Olding 2021-07-31 12:55:35 -07:00
parent 9a3b92357b
commit 2d37ea1135

18
install
View file

@ -20,16 +20,6 @@ die() {
exit 1 exit 1
} }
dotless() {
local f="$1" ind len
ind="$(expr index "$f" .)"
if [ "$ind" -gt 0 ]; then
REPLY="$(expr substr "$f" 2 "${#f}")"
else
REPLY="$1"
fi
}
backup() { backup() {
note "backing up $1" note "backing up $1"
mkdir -p "${backup_dir:?backup_dir unset}/$(dirname "$1")" mkdir -p "${backup_dir:?backup_dir unset}/$(dirname "$1")"
@ -137,15 +127,11 @@ backup_dir="$rc/backup-$(date -u '+%s')"
for f in .bashrc .zshrc .-shrc .prezto-compinit .ls_colors \ for f in .bashrc .zshrc .-shrc .prezto-compinit .ls_colors \
.vimrc .inputrc .Xresources .screenrc .tmux.conf; do .vimrc .inputrc .Xresources .screenrc .tmux.conf; do
dotless "$f" hardlink "$f" "$rc/home/${f#.}"
r="$rc/home/$REPLY"
hardlink "$f" "$r"
done done
for d in sh .vim .mpv; do for d in sh .vim .mpv; do
dotless "$d" softlink "$d" "$rc/${d#.}"
r="$rc/$REPLY"
softlink "$d" "$r"
done done
# ensure that .bashrc gets executed # ensure that .bashrc gets executed