Created
December 9, 2014 15:02
-
-
Save MarcoSero/72ccc9e92a1eccdfbac1 to your computer and use it in GitHub Desktop.
Convert all Cabal documentation to a Dash docset
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/zsh | |
arch=x86_64 | |
os=osx | |
kernel=darwin | |
compiler=ghc | |
version=7.8.3 | |
user=~/.ghc/$arch-$kernel-$version/package.conf.d | |
target=myhaskell.docset | |
dash_path="~/Library/Application Support/Dash/DocSets/Haskell/" | |
rm -rf $target | |
echo "Genereting docset from global libraries..." | |
haddocset -t $target create | |
echo "Genereting doc from user libraries..." | |
for pkg in $user/*.conf ; do haddocset -t $target add $pkg ; done | |
echo "Copying new docset into Dash" | |
mv -R $target $dash_path | |
echo "Now you can restart Dash and rescan the docsets" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment