[Assorted-commits] SF.net SVN: assorted:[1437]
Brought to you by:
yangzhang
From: <yan...@us...> - 2009-05-28 16:56:16
|
Revision: 1437 http://assorted.svn.sourceforge.net/assorted/?rev=1437&view=rev Author: yangzhang Date: 2009-05-28 16:56:05 +0000 (Thu, 28 May 2009) Log Message: ----------- fixed setup issues at yahoo Modified Paths: -------------- configs/trunk/bootstrap.bash shell-tools/trunk/src/bash-commons/common.bash Modified: configs/trunk/bootstrap.bash =================================================================== --- configs/trunk/bootstrap.bash 2009-05-25 18:41:11 UTC (rev 1436) +++ configs/trunk/bootstrap.bash 2009-05-28 16:56:05 UTC (rev 1437) @@ -9,6 +9,7 @@ set -o nounset set -o errexit +set -x setup_coreutils= @@ -34,11 +35,12 @@ } pkg_install() { - if type apt-get ; then + if type apt-get 2> /dev/null ; then sudo apt-get install -y "$@" - elif type yum ; then + elif type yum 2> /dev/null ; then sudo yum install -y "$@" else + echo 'requires apt-get or yum' return 1 fi } @@ -78,7 +80,7 @@ type cat type svn type perl -type gcc || use_sudo && pkg_install build-essential +type gcc || { use_sudo && pkg_install build-essential ; } type python if type wget ; then fetch() { wget -O- "$@" ; } Modified: shell-tools/trunk/src/bash-commons/common.bash =================================================================== --- shell-tools/trunk/src/bash-commons/common.bash 2009-05-25 18:41:11 UTC (rev 1436) +++ shell-tools/trunk/src/bash-commons/common.bash 2009-05-28 16:56:05 UTC (rev 1437) @@ -505,13 +505,13 @@ refresh-local() { ( mkdir -p "$USER_PREFIX" && cd "$USER_PKG" && - stow -t "$USER_PREFIX" "$@" * ) + stow -t "$USER_PREFIX" !(armed) ) } refresh-opt() { ( sudo -u pkg mkdir -p "$GLOBAL_PREFIX" && cd "$GLOBAL_PKG" && - sudo -u pkg stow -t "$GLOBAL_PREFIX" "$@" !(armed) ) + sudo -u pkg stow -t "$GLOBAL_PREFIX" !(armed) ) } cabal-install-all() { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |