[Assorted-commits] SF.net SVN: assorted:[1094] shell-tools/trunk/src/bash-commons
Brought to you by:
yangzhang
From: <yan...@us...> - 2008-12-04 22:22:20
|
Revision: 1094 http://assorted.svn.sourceforge.net/assorted/?rev=1094&view=rev Author: yangzhang Date: 2008-12-04 21:54:06 +0000 (Thu, 04 Dec 2008) Log Message: ----------- added zppw; moved refresh-* to common.bash; added WTF option to zpp Modified Paths: -------------- shell-tools/trunk/src/bash-commons/bashrc.bash shell-tools/trunk/src/bash-commons/common.bash Modified: shell-tools/trunk/src/bash-commons/bashrc.bash =================================================================== --- shell-tools/trunk/src/bash-commons/bashrc.bash 2008-12-04 10:24:36 UTC (rev 1093) +++ shell-tools/trunk/src/bash-commons/bashrc.bash 2008-12-04 21:54:06 UTC (rev 1094) @@ -318,18 +318,6 @@ apg -M SNCL -n 3 -m 8 -x 8 } -function refresh-local { - ( mkdir -p "$USER_PREFIX" && - cd "$USER_PKG" && - stow -t "$USER_PREFIX" "$@" * ) -} - -function refresh-opt { - ( sudo -u pkg mkdir -p "$GLOBAL_PREFIX" && - cd "$GLOBAL_PKG" && - sudo -u pkg stow -t "$GLOBAL_PREFIX" "$@" !(armed) ) -} - # TODO fix function g { #grep --color=always -r "$@" | sed "$( echo -e "s/\([^:]*\):/$bright_blue\1$normal_color:/" )" | less -F @@ -638,9 +626,19 @@ zpp() { local file="$1" shift - wtf g++ -Wall -g3 -o "${file%.*}" "$file" "$@" + ${WTF-wtf} g++ -Wall -g3 -o "${file%.*}" "$file" "$@" } +zppw() { + local file="$1" + shift + zpp "$file" -Wextra -Woverloaded-virtual -Wconversion \ + -Wpointer-arith -Wcast-qual -Wcast-align -Wwrite-strings \ + -Winit-self -Wsign-promo -Wno-unused-parameter -Wc++0x-compat \ + -Wparentheses -Wmissing-format-attribute -Wfloat-equal \ + -Winline -Wsynth "$@" +} + #function set_title() { # if [ $# -eq 0 ] ; then # eval set -- "$PWD" Modified: shell-tools/trunk/src/bash-commons/common.bash =================================================================== --- shell-tools/trunk/src/bash-commons/common.bash 2008-12-04 10:24:36 UTC (rev 1093) +++ shell-tools/trunk/src/bash-commons/common.bash 2008-12-04 21:54:06 UTC (rev 1094) @@ -7,6 +7,7 @@ if [[ "${1:-}" != '-n' ]] ; then set -o errexit set -o nounset + shopt -s extglob fi if [[ "${xtrace:-}" ]] ; then @@ -473,6 +474,18 @@ find "${1:-.}" -type d -empty -print0 | xargs -0r rmdir -p } +refresh-local() { + ( mkdir -p "$USER_PREFIX" && + cd "$USER_PKG" && + stow -t "$USER_PREFIX" "$@" * ) +} + +refresh-opt() { + ( sudo -u pkg mkdir -p "$GLOBAL_PREFIX" && + cd "$GLOBAL_PKG" && + sudo -u pkg stow -t "$GLOBAL_PREFIX" "$@" !(armed) ) +} + cabal-install() { for i in "${@:-}" ; do pushd "$i" && This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |