From fa66a805cce4fd4e4fc501ed6e22c0ed684fab9a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Revol?= Date: Sun, 6 Dec 2009 14:31:24 +0000 Subject: [PATCH] - check for projets on my OSX folder, - fix listing projects when there are none yet, don't use ls|sed, - don't use source as it's bash specific, and test if the .profile exists, avoids a warning when bootstrapping a project, - add vim as a fallback $EDITOR. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34523 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- 3rdparty/mmu_man/scripts/dev-perso | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/3rdparty/mmu_man/scripts/dev-perso b/3rdparty/mmu_man/scripts/dev-perso index b0663bf2a0..d5f2d7561f 100755 --- a/3rdparty/mmu_man/scripts/dev-perso +++ b/3rdparty/mmu_man/scripts/dev-perso @@ -51,7 +51,7 @@ # automagically find them on different machines... -DRLIST="/Data /work $HOME/devel" +DRLIST="$HOME/devel /Data /work /Volumes/Data/devel" PWLIST="/Data /fat32 $HOME" for d in $DRLIST; do test -d $d && DEVROOT=$d && break; @@ -67,7 +67,8 @@ export PASSWDS function dev() { if [ $# -lt 1 ]; then - ls $DEVROOT/*/.profile | sed 's,.*/\([^/]*\)/.profile,\1,' + #ls $DEVROOT/*/.profile | sed 's,.*/\([^/]*\)/.profile,\1,' + for f in "$DEVROOT/"*; do test -e "$f/.profile" || continue; echo ${f##*/}; done return 0 fi if [ "x$1" = "x--help" ]; then @@ -116,7 +117,10 @@ function dev() { esac # source the specific profile file - source .profile + test -f .profile && . .profile + + # if no editor defined, set one + test -z "$EDITOR" -a -z "$SVN_EDITOR" && export EDITOR=vim # make sure the update action is the first found in history. test -d .svn && history -s svn up