[Assorted-commits] SF.net SVN: assorted:[1097] shell-tools/trunk
Brought to you by:
yangzhang
From: <yan...@us...> - 2008-12-08 07:57:34
|
Revision: 1097 http://assorted.svn.sourceforge.net/assorted/?rev=1097&view=rev Author: yangzhang Date: 2008-12-08 07:57:26 +0000 (Mon, 08 Dec 2008) Log Message: ----------- removed bootstrap; added bootstrap-cabal Modified Paths: -------------- shell-tools/trunk/README Added Paths: ----------- shell-tools/trunk/src/bootstrap-cabal.bash Removed Paths: ------------- shell-tools/trunk/src/bootstrap.bash Modified: shell-tools/trunk/README =================================================================== --- shell-tools/trunk/README 2008-12-07 08:18:08 UTC (rev 1096) +++ shell-tools/trunk/README 2008-12-08 07:57:26 UTC (rev 1097) @@ -98,6 +98,9 @@ `refresh-links` Kept solely as a reference, since it uses a bash bunch of interesting pipe redirection. + +`bootstrap- Fetch, build, and install cabal. bash, ghc6 +cabal` -------------------------------------------------------------------------------- [HSH]: http://software.complete.org/hsh/ Added: shell-tools/trunk/src/bootstrap-cabal.bash =================================================================== --- shell-tools/trunk/src/bootstrap-cabal.bash (rev 0) +++ shell-tools/trunk/src/bootstrap-cabal.bash 2008-12-08 07:57:26 UTC (rev 1097) @@ -0,0 +1,56 @@ +#!/usr/bin/env bash + +# From +# <http://ghcmutterings.wordpress.com/2008/11/10/bootstrapping-cabal-install/> + +set -e + +for i in $TMPDIR /tmp c:/temp; do + if test -d $i; then + dir=$i + break + fi + dir=$HOME +done + +cd $dir +wget http://hackage.haskell.org/packages/archive/zlib/0.5.0.0/zlib-0.5.0.0.tar.gz +tar xzf zlib-0.5.0.0.tar.gz +cd zlib-0.5.0.0 +ghc --make Setup +./Setup configure --user +./Setup build +./Setup register --inplace --user + +cd $dir +wget http://hackage.haskell.org/packages/archive/HTTP/3001.1.4/HTTP-3001.1.4.tar.gz +tar xzf HTTP-3001.1.4.tar.gz +cd HTTP-3001.1.4 +ghc --make Setup +./Setup configure --user +./Setup build +./Setup register --inplace --user + +cd $dir +wget http://hackage.haskell.org/packages/archive/cabal-install/0.6.0/cabal-install-0.6.0.tar.gz +tar xzf cabal-install-0.6.0.tar.gz +cd cabal-install-0.6.0 +ghc --make Setup +./Setup configure --user +./Setup build + +# Don't need these libs any more... +ghc-pkg unregister zlib-0.5.0.0 +ghc-pkg unregister HTTP-3001.1.4 + +# Now use cabal-install to install itself and its dependencies +./dist/build/cabal/cabal update +./dist/build/cabal/cabal install cabal-install + +# Clean up... +cd $dir +rm -rf zlib-0.5.0.0* +rm -rf HTTP-3001.1.4* +rm -rf cabal-install-0.6.0* + +echo "ALL DONE!" Deleted: shell-tools/trunk/src/bootstrap.bash =================================================================== --- shell-tools/trunk/src/bootstrap.bash 2008-12-07 08:18:08 UTC (rev 1096) +++ shell-tools/trunk/src/bootstrap.bash 2008-12-08 07:57:26 UTC (rev 1097) @@ -1,57 +0,0 @@ -#!/usr/bin/env bash -# vim:et:sw=4 - -# Sets up the current user account for synchronizing with your home directory. - -set -o errexit - -link_dir=~/local -pkg_dir=~/local -do_unison=1 -usage="$cmd_name [OPTIONS] -Options: - -g use /opt/links as link dir and /opt as crawl dir - -h display this help message - -l dir set the link dir - -p dir set the pkg dir - -r set the ssh target that serves as the central repo - -u do not deploy or use unison" - -while getopts 'ghl:p:r:u' opt ; do - case "$opt" in - g ) link_dir=/opt/links ; pkg_dir=/opt ;; - h ) echo "$usage" ; exit ;; - l ) link_dir="$OPTARG" ;; - p ) pkg_dir="$OPTARG" ;; - r ) home_ssh="$OPTARG" ;; - u ) do_unison= ;; - \? ) errexit ;; - esac -done - -if [[ $do_unison ]] ; then -# if [[ ! -f common.bash ]] ; then -# pushd "$( dirname "$0" )" -# scp "$home_ssh:local/assorted/src/released/bash/common.bash" . -# . common.bash -# rm common.bash -# popd -# else -# . common.bash -# fi - mkdir -p "$pkg_dir/unison/bin" ~/.unison - wget -O "$pkg_dir/unison/bin/unison" 'http://www.cis.upenn.edu/~bcpierce/unison/download/stable/unison-2.9.1/unison.linux-static-textui' - chmod +x "$pkg_dir/unison/bin/unison" - scp -q "$home_ssh:.unison/common.prf .unison/apps.prf .unison/home.prf" ~/.unison - ln -s ~/.unison/home.prf ~/.unison/default.prf 2> /dev/null || true - "$pkg_dir/unison/bin/unison" -root "$HOME" -root "ssh://$home_ssh/" -logfile "$HOME/.unison/unison.log" - chmod +x "$pkg_dir/assorted/src/released/bash/"*.bash - ln -s ~/vimfiles ~/.vim || true -else - mkdir -p "$pkg_dir" - scp -C -o CompressionLevel=9 -r "$home_ssh:local/assorted" "$pkg_dir" -fi - -export PATH="$pkg_dir/assorted/src/released/bash/:$PATH" -refresh-assorted.bash "$pkg_dir/assorted" -refresh-links.bash -l "$link_dir" "$pkg_dir" This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |