Skip to content

Commit

Permalink
script(symlink): fix backup dirs
Browse files Browse the repository at this point in the history
  • Loading branch information
trevor-coleman committed Jan 31, 2024
1 parent 2968875 commit 8a5fbc4
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions scripts/symlink.sh
Original file line number Diff line number Diff line change
Expand Up @@ -94,10 +94,10 @@ if [ "$ACTION" = "add" ]; then

# If a directory already exists at the target
if [ -d "$TARGET" ]; then
# Backup the existing directory by moving it
echo "$(tput setaf 3)Saving backup of existing directory in $BACKUP_DOCS_DIR$(tput sgr 0)"
mkdir -p "$BACKUP_DIR/docs"
mv "$TARGET" "$BACKUP_DIR/docs"
# Backup the existing directory by moving it
echo "$(tput setaf 3)Saving backup of existing directory in $BACKUP_DOCS_DIR/$(tput sgr 0)"
mkdir -p "$BACKUP_DOCS_DIR"
mv "$TARGET" "$BACKUP_DOCS_DIR"
fi

if [ -d "$TARGET_STATIC" ]; then
Expand Down

0 comments on commit 8a5fbc4

Please sign in to comment.