Skip to content

Commit

Permalink
Generalize backup scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
Spaceface16518 committed Oct 8, 2020
1 parent 20136c6 commit 894bc62
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion utils/bkp_cargo_home.sh
@@ -1,4 +1,4 @@
#!/bin/bash
set -e

cp --reflink=auto --force --recursive /home/matthias/.cargo/ /home/matthias/.cargo_bkp/
cp --reflink=auto --force --recursive $HOME/.cargo/ $HOME/.cargo_bkp/
6 changes: 3 additions & 3 deletions utils/unbkp_cargo_home.sh
@@ -1,6 +1,6 @@
#!/bin/bash
set -e
if [[ -d "/home/matthias/.cargo" && "/home/matthias/.cargo_bkp" ]]; then
rm -rf /home/matthias/.cargo/
cp -rf --reflink=auto /home/matthias/.cargo_bkp /home/matthias/.cargo
if [[ -d "$HOME/.cargo" && "$HOME/.cargo_bkp" ]]; then
rm -rf $HOME/.cargo/
cp -rf --reflink=auto $HOME/.cargo_bkp $HOME/.cargo
fi

0 comments on commit 894bc62

Please sign in to comment.