summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorneodarz <neodarz@neodarz.net>2017-08-03 00:45:07 +0200
committerneodarz <neodarz@neodarz.net>2017-08-03 00:45:07 +0200
commit6bc2f60c724240ecf671ffec0eeb11ebf3028dec (patch)
tree6a6c571b02c68636db4dd9af7700808a0f66fbe0
parentdba56cfa028e2feaaa34a4dc0e2489afcc4dc9ad (diff)
downloadyolorandom.cat-6bc2f60c724240ecf671ffec0eeb11ebf3028dec.zip
yolorandom.cat-6bc2f60c724240ecf671ffec0eeb11ebf3028dec.tar.xz
Add script for test if image is ok
-rwxr-xr-xtest_images.sh11
1 files changed, 11 insertions, 0 deletions
diff --git a/test_images.sh b/test_images.sh
new file mode 100755
index 0000000..758a589
--- /dev/null
+++ b/test_images.sh
@@ -0,0 +1,11 @@
+count=$(ls images | grep 'back[1-9][0-9]*.jpg' | wc -w)
+test=$(ls images | grep 'back[1-9][0-9]*.jpg' | sort -Vr | head -n 1 | grep "back$count.jpg")
+if [[ $test == "" ]];then
+ file=$(ls images | grep 'back[1-9][0-9]*.jpg' | sort -Vr | head -n 1)
+ echo "Error: There is $count file(s) but the biggest file is: $file"
+ if [[ $1 == "-v" ]];then
+ echo $(ls images | sort -V)
+ fi
+else
+ echo "All is fine !"
+fi