cminify.sh 196 B

1234567891011
  1. #!/bin/bash
  2. if [[ -z $1 ]]
  3. then
  4. echo "No param provided!"
  5. exit 1
  6. fi
  7. sed -rb 's/ {6}//g' $1 |
  8. sed -rb 's/\/\/.*$//g' |
  9. tr -d '\n' |
  10. sed -rb 's/\/\*.*\*\///g' |
  11. sed -rb 's/(#include.*>)/\1\n/g'