Skip to content

Commit

Permalink
adding readme
Browse files Browse the repository at this point in the history
  • Loading branch information
masterkain committed Sep 13, 2009
1 parent 76e6e3f commit aed5069
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 4 deletions.
26 changes: 26 additions & 0 deletions Readme.markdown
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Introduction

This is bash script to install ImageMagick on Snow Leopard.

## Configuration

Please have a look at install_im.sh to customize your environment.

## Execution

You can run the script as a normal user, it does use sudo at a certain point, so be sure to not leave the installation unattended.
Depending on many factors the sudo command may expire during the execution of the script, so if it asks you again the password don't worry, it's normal.

Alternatively you can run the script as root.

chmod +x install_im.sh
sh install_im.sh

## Contribute

If you find that the script uses an outdated version of the requirements or ImageMagick, please modify the script accordingly, test if it can still produce a valid ImageMagick installation and notify me about the changes, thanks.

## Resources

* [iCoreTech Research Labs](http://www.icoretech.org)
* [Github Repository](http://github.com/masterkain/ImageMagick-sl)
7 changes: 3 additions & 4 deletions install_im.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,15 @@ function try_download () {
curl --fail --silent -O --url $1
result=$? # Store the code of the last action, should be 0 for a successfull download.
file_size=`ls -l "$file_name" | awk '{print $5}'`
# We check for normal http errors, otherwise check the file size
# since some websites, like sourceforge, redirects and curl can't
# We check for normal errors, otherwise check the file size.
# Some websites like sourceforge redirects and curl can't
# detect the problem.
if [[ $result -ne 0 || $file_size -lt 500000 ]] # less than 500K
then
echo "Failed download: $1, size: "$file_size"B, aborting." >&2 # output on stderr.
exit 65
else
# add the filename to an array to be decompressed later.
apps=( "${apps[@]}" "$file_name" )
apps=( "${apps[@]}" "$file_name" ) # add the filename to an array to be decompressed later.
fi
}

Expand Down

0 comments on commit aed5069

Please sign in to comment.