Commit 64435271 authored by Damyan Ivanov's avatar Damyan Ivanov

localize variables used in dpt() to avoid pollution

parent b38a8c38
......@@ -14,8 +14,9 @@
# commands and change the CWD accordingly
dpt() {
local REAL TMP ES
REAL=`command which dpt`
TMP=`mktemp -d`
TMP=`mktemp -d --suffix=dpt`
trap "command rm -rf '$TMP'" 0 INT TERM PIPE
mkfifo "$TMP/pipe"
(
......@@ -27,6 +28,7 @@ dpt() {
if egrep -q "^Updating existing checkout in .+" "$TMP/out"; then
DIR=`egrep '^Updating existing' "$TMP/out" | sed -e 's/Updating existing checkout in //'`
cd "$DIR"
return $ES
fi
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment