mirror of
https://github.com/Jonny007-MKD/OTR-SaneRename
synced 2025-01-22 08:49:48 +01:00
Run tests without and with cache
This commit is contained in:
parent
f9caf462a2
commit
197086a236
1 changed files with 49 additions and 23 deletions
|
@ -33,10 +33,31 @@ fi
|
||||||
|
|
||||||
if [ ! -f "$path/saneRenamix.py" ]; then
|
if [ ! -f "$path/saneRenamix.py" ]; then
|
||||||
echo "saneRenamix.py not found!" >&2
|
echo "saneRenamix.py not found!" >&2
|
||||||
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
function finish {
|
||||||
|
pushd $path
|
||||||
|
# Restore *.cache
|
||||||
|
for f in `ls *.cache.orig`; do
|
||||||
|
mv "$f" "${f::-5}"
|
||||||
|
done
|
||||||
|
popd
|
||||||
|
}
|
||||||
|
trap finish EXIT
|
||||||
|
|
||||||
for the_file in "${!files[@]}"; do
|
function init {
|
||||||
|
pushd $path
|
||||||
|
# Remove caches
|
||||||
|
for f in `ls *.cache`; do
|
||||||
|
mv "$f" "$f.orig"
|
||||||
|
done
|
||||||
|
popd
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
function runTest {
|
||||||
|
for the_file in "${!files[@]}"; do
|
||||||
echo -e "\033[37m${the_file}";
|
echo -e "\033[37m${the_file}";
|
||||||
|
|
||||||
file="${the_file//_/ }"
|
file="${the_file//_/ }"
|
||||||
|
@ -64,6 +85,11 @@ for the_file in "${!files[@]}"; do
|
||||||
rm $path/$epg_file
|
rm $path/$epg_file
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
echo -ne "\033[37m"
|
||||||
read -p "ok. next? "
|
read -p "ok. next? "
|
||||||
done;
|
done;
|
||||||
|
}
|
||||||
|
|
||||||
|
init
|
||||||
|
runTest
|
||||||
|
runTest
|
||||||
|
|
Loading…
Reference in a new issue