X-Git-Url: https://oss.titaniummirror.com/gitweb/?a=blobdiff_plain;f=tinyos.sh;h=6886286bd8dc2a4edf4e1d8a8c15a46400105246;hb=13e400e82fdf39ec7807c7b290136408044d6273;hp=f7e1368f061121d0451e8c3ba346bb50da997dbe;hpb=3d98c9a5b507e9aee1e4b4e0232d083c670e518d;p=tinyos-2.x.git diff --git a/tinyos.sh b/tinyos.sh index f7e1368f..6886286b 100644 --- a/tinyos.sh +++ b/tinyos.sh @@ -5,7 +5,7 @@ # and may source again at any time to change which installed TinyOS source # tree their code shall be built against. -TOSCFG=~/.tosrc +TOSCFG="$HOME/.tosrc" TOSBASE=/opt/tinyos RCFILES="$HOME/.bashrc $HOME/.shrc $HOME/.kshrc $HOME/.cshrc $ENV" @@ -20,7 +20,7 @@ gettosroot() fi } -# Update CLASSPATH by replacing the element value in $1 with the element value +# Update CLASSPATH by replacing the element value in $1 with the element value # in $2. An empty $2 removes element $1, if present. An empty $1, or $1 not # present, adds $2. updclasspath() @@ -101,7 +101,7 @@ elif [ "$(basename -- $0)" = tinyos.sh ]; then # Operations below here cannot be executed in a sub-shell echo "tinyos: must be sourced" elif [ "$1" = "-u" ]; then - if [ -f $TOSCFG ]; then + if [ -f "$TOSCFG" ]; then uninstallshrc updclasspath "$TOSROOT" "" unset TOSROOT TOSDIR MAKERULES @@ -115,7 +115,7 @@ else if [ -n "$1" ]; then newroot=$(gettosroot "$1") if [ -n "$newroot" ]; then - echo "$TOSROOT" > "$TOSCFG" + echo "$newroot" > "$TOSCFG" installshrc echo "tinyos: now using $newroot" else