mirror of
https://github.com/lloeki/dotfiles.git
synced 2025-12-06 07:24:39 +01:00
Clean setup
This commit is contained in:
parent
54e03df8a6
commit
fefe99ae9f
2 changed files with 9 additions and 7 deletions
10
setup.sh
10
setup.sh
|
|
@ -1,17 +1,19 @@
|
|||
#!/bin/sh
|
||||
|
||||
[ $(pwd) = "$HOME/.dotfiles" ] || ln -sfn "$(pwd)" "$HOME/.dotfiles"
|
||||
|
||||
for file in home/*; do
|
||||
dotfile="$(basename "$file")"
|
||||
case "${dotfile}" in
|
||||
Makefile|*.md|LICENSE|setup.sh)
|
||||
# NOOP
|
||||
: # NOOP
|
||||
;;
|
||||
*)
|
||||
if [ -d "${dotfile}" ]; then
|
||||
:
|
||||
else
|
||||
# link the file with a leading dot
|
||||
echo "linking ${dotfile}"
|
||||
ln -sf "$(pwd)/${file}" "$HOME/.${dotfile}"
|
||||
ln -sf "${PWD}/${file}" "$HOME/.${dotfile}"
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue