diff options
Diffstat (limited to 'bin/poolify')
-rwxr-xr-x | bin/poolify | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/bin/poolify b/bin/poolify index af8bf40..e33821b 100755 --- a/bin/poolify +++ b/bin/poolify @@ -13,6 +13,7 @@ main() { set -euE -o pipefail shopt -s nullglob + echo '# Pass 1' while read -r snap name date time size; do dirpart="${name%/*}" filepart="${name##*/}" @@ -22,6 +23,7 @@ main() { ln -sr "$filedir/$filepart" "$snapdir" done < "$1" + echo '# Pass 2' while read -r time url; do name="${url##*/Public/}" dirpart="${name%/*}" @@ -63,6 +65,13 @@ main() { i+=1 done done < "$2" + + echo '# Pass 3' + while read -r missing; do + if [[ -f "${missing/.OLD}/${missing##*_}" ]]; then + ln -sr "${missing/.OLD}/${missing##*_}" "$missing" + fi + done < <(find dat/pools/files/*-PROGRAMS_CVTUTF.OLD_* -type d -empty) } main "$@" |