sahib / rmlint

Extremely fast tool to remove duplicates and other lint from your filesystem
http://rmlint.rtfd.org
GNU General Public License v3.0
1.92k stars 132 forks source link

Generated script uses bashisms #28

Closed Necronian closed 12 years ago

Necronian commented 12 years ago

The generated rmlint.sh script uses bashisms although the shebang is #!/bin/sh. When run on my debian system this causes the script to fail because /bin/sh points to dash not bash. I'm not sure if the script should be made sh compliant or the shebang changed to something like #!/usr/bin/env bash.

The when running the script $ ./rmlint.sh ./rmlint.sh: 49: ./rmlint.sh: [[: not found ./rmlint.sh: 55: ./rmlint.sh: [[: not found

I ran checkbashisms on the generated file $ checkbashisms rmlint.sh possible bashism in rmlint.sh line 13 (read without variable): read possible bashism in rmlint.sh line 49 (alternative test command ([[ foo ]] should be [ foo ])): if [[ -z $DO_ASK ]] possible bashism in rmlint.sh line 55 (alternative test command ([[ foo ]] should be [ foo ])): if [[ -z $DO_REMOVE ]]

sahib commented 12 years ago

Thanks, fixed.