Skip to content

Commit

Permalink
setup: small tweak
Browse files Browse the repository at this point in the history
  • Loading branch information
ken-matsui committed Nov 25, 2024
1 parent 0d0cad3 commit d306ead
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions setup/common/config.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@ DOTSPATH="${DOTSPATH:-$HOME/dotfiles}"
backup_and_link() {
TARGET="${2:+$2/$(basename "$1")}"
TARGET="${TARGET:-$HOME/$1}"
# TARGET=$HOME/Library/Application Support/Code on Darwin
# TARGET=$HOME/.config/Code on Linux

if [ -e "$TARGET" ]; then
echo "Backing up $TARGET to $TARGET.bak ..."
Expand All @@ -19,8 +17,10 @@ backup_and_link() {
}

if [ "$(uname)" = Darwin ]; then
# TARGET=$HOME/Library/Application Support/Code
backup_and_link .config/Code "$HOME/Library/Application Support"
elif [ "$(uname)" = Linux ]; then
# TARGET=$HOME/.config/Code
backup_and_link .config/Code
fi

Expand Down

0 comments on commit d306ead

Please sign in to comment.