[init] initial commit

This commit is contained in:
2023-06-05 23:04:30 +08:00
commit 66b1dd4d70
72 changed files with 10079 additions and 0 deletions

14
old/nav_jpg.sh Normal file
View File

@ -0,0 +1,14 @@
#!/bin/bash
html='/opt/websites/nav/index.html'
jpg_max_num=`cat $html | grep -oE "[0-9]+\.jpg" | awk -F '.' '{print $1}' | sort -n | tail -n 1`
line_num=`cat $html | grep -oE "[0-9]+\.jpg" | awk -F '.' '{print $1}' | sort -n | uniq -c | wc -l`
jpg_all_num=`ls -al /opt/websites/nav/assets/images/logos/ | wc -l`
if [[ $((jpg_max_num+1)) -ne $line_num ]]; then
echo -e "\e[1;31mThere must be duplicated jpg files, plz check!\e[0m"
return 2
fi
echo "Now: $jpg_max_num | MAX: $jpg_all_num | AVAILABLE: $((jpg_all_num-jpg_max_num)) | NEXT: $((jpg_max_num+1))"