logo

utils-std

Collection of commonly available Unix tools git clone https://anongit.hacktivis.me/git/utils-std.git/

uuencode.sh (654B)


  1. #!/bin/sh
  2. # SPDX-FileCopyrightText: 2017 Haelwenn (lanodan) Monnier <contact+utils@hacktivis.me>
  3. # SPDX-License-Identifier: MPL-2.0
  4. WD="$(dirname "$0")"
  5. target="${WD}/../cmd/uuencode"
  6. plans=6
  7. . "$(dirname "$0")/tap.sh"
  8. umask 022
  9. t --input='' 'empty' 'empty' 'begin 644 empty
  10. `
  11. end
  12. '
  13. t --input='Cat' 'Cat' '' 'begin 644 -
  14. #0V%T
  15. end
  16. '
  17. t --input='CatCat' 'CatCat' '' 'begin 644 -
  18. &0V%T0V%T
  19. end
  20. '
  21. t --input='CatCatCat' 'CatCatCat' '' 'begin 644 -
  22. )0V%T0V%T0V%T
  23. end
  24. '
  25. t_file all_bytes "$WD/outputs/uuencode/all_bytes" "$WD/inputs/all_bytes" all_bytes
  26. t_file all_bytes.base64 "$WD/outputs/uuencode/all_bytes.base64" -m "$WD/inputs/all_bytes" all_bytes