index : dotfiles.git

ascending towards madness

author holly sparkles <sparkles@holly.sh> 2024-04-28 19:21:36.0 +00:00:00
committer holly sparkles <sparkles@holly.sh> 2024-04-28 19:21:36.0 +00:00:00
commit
05b94b26d3e2253a64fc0b6be257161fae99c097 [patch]
tree
486e635d514b636019512aa9c4fbbf37b0205080
parent
5baa3f4647c1b556ecc3cceeae38b6e8258d2910
download
05b94b26d3e2253a64fc0b6be257161fae99c097.tar.gz

add untested restore function



Diff

 sync.zsh | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/sync.zsh b/sync.zsh
index 1e5b1b5..a961a52 100755
--- a/sync.zsh
+++ b/sync.zsh
@@ -24,6 +24,16 @@ sync() {
  echo "done."
}

restore() {
  # configs
  cp -v "${DOTFILES_DIR}/.zshrc" "${HOME}/.zshrc"
  cp -vr "${DOTFILES_DIR}/.config" "${HOME}/"

  # scripts
  cp -vr "${DOTFILES_DIR}/.scripts" "${HOME}/"
  echo "done."
}

clean() {
  # dirs
  rm -rfv "${DOTFILES_DIR}/.config"
@@ -36,6 +46,8 @@ clean() {
main() {
  if [[ "$1" == "clean" ]]; then
    clean
  elif [[ "$1" == "restore" ]]; then
    restore
  else
    sync
  fi