You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

14 lines
542 B

  1. #!/bin/bash
  2. ## import common lib
  3. . "$HOME/.noaa.conf"
  4. . "$NOAA_HOME/common.sh"
  5. for img_path in $(sqlite3 ${NOAA_HOME}/panel.db "select file_path from decoded_passes limit 10;"); do
  6. find "${NOAA_OUTPUT}/images/" -type f -name "${IMG_NAME}*.jpg" -exec rm -f {} \;
  7. find "${NOAA_OUTPUT}/images/thumb/" -type f -name "${IMG_NAME}*.jpg" -exec rm -f {} \;
  8. log "${img_path} file pruned" "INFO"
  9. sqlite3 "${NOAA_HOME}/panel.db" "delete from decoded_passes where file_path = \"$img_path\";"
  10. log "Database entry pruned" "INFO"
  11. done