Pastebin

Paste #10511: No description

< previous paste - next paste>

Pasted by Anonymous Coward

Download View as text

#!/bin/zsh
# enable extended globbing required for the folder matching we do here
setopt extendedglob
dest_folder="../view_copy"
quality="60"
resolution="1920x1920"
# Match all folders matching 2???/2* and all their subfolders, except if any of those folders are called 'private'
( for x in 2???/2*/(^(private|privat)/)
for year in 20??; do 
    time ( 
    for x in $year/2*/(^(private|privat)/)
        if [[ ! -e "$dest_folder/$x" ]] || [[ "$x" -nt "$dest_folder/$x" ]] ; then
            nice convert -quiet -quality $quality -resize $resolution $x $dest_folder/$x
        fi
    done
    ) &
done

dest_folder="../view_copy"
( for x in 2???/in/(^(private|privat)/)
for year in 20??; do 
    time ( 
    for x in $year/in/(^(private|privat)/)
        if [[ ! -e "$dest_folder/$x" ]] || [[ "$x" -nt "$dest_folder/$x" ]] ; then
            nice convert -quiet -quality $quality -resize $resolution $x $dest_folder/$x
        fi
    done
    ) &
done

echo "Waiting for processes to complete"
wait

New Paste


Do not write anything in this field if you're a human.

Go to most recent paste.