Created
February 12, 2017 20:10
-
-
Save dlight/4ad32ea0a3737a7977f2b13977d5ce04 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| cd $(dirname $(realpath $0))/parity | |
| find \( -name data -o -name '*.vol*+*.par2' \) -prune -or -name '*.par2' -type f \ | |
| \( -exec par2 verify -qq {} \; -o -print \) | sed 's/\.par2$//; s/^/Bad file: /' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| cd $(dirname $(realpath $0)) | |
| rm -r parity | |
| mkdir -p parity | |
| ln -sfT ../ parity/data | |
| find * -name parity -prune -or -type d -exec mkdir -p parity/{} \; -exec ln -sfT ../../{} parity/{}/data \; | |
| cd parity | |
| for d in . *; do | |
| if [[ -d $d ]] && [[ $d != data ]]; then | |
| pushd $d | |
| find -L data -maxdepth 1 -type f -exec bash -c 'par2 create -q -r25 $(basename $0).par2 $0' {} \; | |
| popd > /dev/null | |
| fi | |
| done |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| cd $(dirname $(realpath $0)) | |
| for f in $(./check-parity | sed 's/^Bad file: //'); do | |
| par2 repair -q parity/$f.par2 | |
| done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment