generate-timestamp-test-dir.sh 616 B

1234567891011121314151617181920212223
  1. #!/usr/bin/env bash
  2. if [ -z "$1" ]; then
  3. echo "Usage: $0 <output_dir>";
  4. exit 1;
  5. fi
  6. rm "$1" -rf;
  7. mkdir -p "$1";
  8. cd "$1" || exit;
  9. # generate files of various age
  10. # TODO: some are commented out due to undeterministic behavior, see:
  11. # https://github.com/eza-community/eza/issues/574
  12. touch --date="13 month ago" ./13_month
  13. #touch --date="11 month ago" ./11_month
  14. #touch --date="7 month ago" ./07_month
  15. #touch --date="5 month ago" ./05_month
  16. touch --date="now" ./now
  17. #touch --date="next hour" ./next_hour
  18. #touch --date="next month" ./next_month
  19. #touch --date="next year" ./next_year