You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
25 lines
488 B
Bash
25 lines
488 B
Bash
10 months ago
|
#!/bin/sh
|
||
|
|
||
|
scripts="$(dirname "$0")"
|
||
|
|
||
|
set -e
|
||
|
|
||
|
tmp=$(mktemp --tmpdir=/tmp tmp_szmapy_XXXXXXXXX)
|
||
|
trap "rm $tmp" EXIT
|
||
|
|
||
|
"$scripts"/stahni.sh
|
||
|
rename 'Show.aspx?path=%2FData%2FMapy%2F' '' *.pdf
|
||
|
"$scripts"/smaz_duplikaty > "$tmp"
|
||
|
echo "Will remove following files:"
|
||
|
cat "$tmp"
|
||
|
if grep -q --invert-match -E '^\./' "$tmp"; then
|
||
|
# Some file is elsewhere
|
||
|
echo "Please confirm (^C to kill)"
|
||
|
read
|
||
|
else
|
||
|
echo "All files are in this directory, removing."
|
||
|
fi
|
||
|
< "$tmp" xargs rm -fv
|
||
|
|
||
|
#TODO: porovnání
|