No puede seleccionar más de 25 temas Los temas deben comenzar con una letra o número, pueden incluir guiones ('-') y pueden tener hasta 35 caracteres de largo.
 
 

21 líneas
431 B

  1. #!/usr/bin/env bash
  2. set -euo pipefail
  3. INPUT="$1"
  4. STAGING="$2"
  5. OUTPUT="$3"
  6. while true ; do
  7. echo "Attempting to move files..."
  8. COUNT=$(find "$INPUT" -type f | wc -l)
  9. if [[ $COUNT -ne 0 ]]; then
  10. echo "Found $COUNT files!"
  11. echo "Moving from input to staging..."
  12. mv -v "$INPUT"/* "$STAGING/" || true
  13. echo "Atomically moving from staging to output..."
  14. mv -v "$STAGING"/* "$OUTPUT/" || true
  15. fi
  16. sleep 5
  17. done