install.sh: improve

This commit is contained in:
Jason Swank 2024-01-09 18:27:30 -05:00
parent 9b74ff46f9
commit 7a8ecc84b7

View File

@ -12,13 +12,13 @@ git submodule update --init --recursive
# if these aren't links, move them out of the way?
for f in ~/.zshrc ~/.profile; do
if [ -f $f ]; then
mv $f $f.orig
if [ -f "$f" ]; then
mv "$f" "$f.orig"
fi
done
if [ -n $1 ]; then
$STOW -t $HOME $1
if [ -n "$1" ]; then
$STOW -t $HOME "$1"
exit 1
fi
@ -36,6 +36,6 @@ for dir in \
tmux \
zsh
do
$STOW -t ~/ $dir
$STOW -t $HOME $dir
done