Search code examples
macosopenid-selector

Errors trying to refresh openid-selector sprites on OSX


I'm using openid-selector, I've updated the openid-en.js with news providers and now, following the readme.txt of the project, I should refresh sprite images with generate-sprite.sh.

But, when I try to run generate-sprite.sh on OSX terminal, the errors below are shown on output:

./generate-sprite.sh: ./remcomments.sed: /bin/sed: bad interpreter: No such file or directory
./generate-sprite.sh: ./remcomments.sed: /bin/sed: bad interpreter: No such file or directory
./generate-sprite.sh: line 70: montage: command not found
./generate-sprite.sh: line 71: montage: command not found
./generate-sprite.sh: line 72: convert: command not found
rm: small.bmp: No such file or directory
rm: large.bmp: No such file or directory
done

Does anyone knows what is wrong with command or what is missing on my OSX?


Solution

  • There are two problems here:

    1. The './remcomments.sed: /bin/sed: bad interpreter' problem

    Inside the ./remcomments.sed file that come with openid-selector there is this first line:

    #!/bin/sed -nf

    Well, in OSX the path for sed command is: /usr/bin/sed, so to fix the first problem, just change the first line of ./remcomments.sed to:

    #!/usr/bin/sed -nf

    1. The 'montage: command not found' problem

    There was no 'mountage' command on OSX. To fix the second problem you will need to install ImageMagick.

    With these two problems solved the generage-sprinte.sh will execute successful.