Skip to content

Commit

Permalink
Add distribution script.
Browse files Browse the repository at this point in the history
  • Loading branch information
Per Olofsson authored and Per Olofsson committed Sep 23, 2013
1 parent e7ecb69 commit a96b364
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@
project.xcworkspace/
xcuserdata/
Screenshots/
Distributions/InstallESDtoDMG-*.*
21 changes: 21 additions & 0 deletions Distributions/create_dmg.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#!/bin/bash

srcdir="$1"

if [ -z "$srcdir" -o ! -d "$srcdir" ]; then
echo "Usage: $0 srcdir"
exit 1
fi

name=`basename "$srcdir"`

echo "Cleaning"
find "$srcdir" -name .DS_Store -print0 | xargs -0 rm -f

echo "Adding documentation"
markdown ../README.markdown | cat ../README.css - | tidy -q -i > "$srcdir/$name.html"

echo "Creating image"
dmg_fname="$srcdir.dmg"
sudo -p "Password for %p@%h: " hdiutil create -srcfolder "$srcdir" -uid 0 -gid 0 -ov "$dmg_fname"
sudo -p "Password for %p@%h: " chown ${UID} "$dmg_fname"
11 changes: 11 additions & 0 deletions README.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<style type="text/css">

body {
font-family: sans-serif;
}

li {
list-style: disc;
}

</style>

0 comments on commit a96b364

Please sign in to comment.