Skip to content

Commit

Permalink
backup workstation dir on install
Browse files Browse the repository at this point in the history
  • Loading branch information
joelmccracken committed Dec 28, 2024
1 parent a551b36 commit c6d414c
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions ws_tool/ws_install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ TMPINST=$(mktemp -d "${TMPDIR:-/tmp}/ws-install.XXXXXXXXX")
( cd "$TMPINST";
curl -L https://github.com/joelmccracken/workstation/archive/${WORKSTATION_VERSION}.tar.gz | tar zx

if [[ -e "$WORKSTATION_DIR" ]]; then
mv "$WORKSTATION_DIR" "${WORKSTATION_DIR}-$(date +"%s")"
fi

mkdir -p "$WORKSTATION_DIR"
mv "${TMPINST}"/workstation-*/{,.[^.]}* "$WORKSTATION_DIR"
)

0 comments on commit c6d414c

Please sign in to comment.